Merge branch 'master' into tunnel

Conflicts:
	Classes/LinphoneUI/LinphoneManager.m
This commit is contained in:
Jehan Monnier 2011-04-12 14:28:54 +02:00
commit 791d5ce3a5
2 changed files with 13 additions and 9 deletions

View file

@ -391,9 +391,6 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
//set to default proxy
linphone_core_set_default_proxy(theLinphoneCore,proxyCfg);
LinphoneAddress* addr=linphone_address_new(linphone_proxy_config_get_addr(proxyCfg));
proxyReachability=SCNetworkReachabilityCreateWithName(nil, linphone_address_get_domain(addr));
} else {
if (configCheckDisable == false ) {
UIAlertView* error = [[UIAlertView alloc] initWithTitle:@"Warning"
@ -403,10 +400,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
otherButtonTitles:@"Never remind",nil];
[error show];
}
proxyReachability=SCNetworkReachabilityCreateWithName(nil, "linphone.org");
}
proxyReachabilityContext.info=self;
//tunnel
BOOL lTunnelPrefEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"tunnel_enabled_preference"];
NSString* lTunnelPrefAddress = [[NSUserDefaults standardUserDefaults] stringForKey:@"tunnel_address_preference"];
@ -421,8 +415,6 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
}
sTunnelMgr->enable(lTunnelPrefEnabled);
SCNetworkReachabilitySetCallback(proxyReachability, (SCNetworkReachabilityCallBack)networkReachabilityCallBack,&proxyReachabilityContext);
SCNetworkReachabilityScheduleWithRunLoop(proxyReachability, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
//Configure Codecs
@ -468,7 +460,10 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
if (theLinphoneCore != nil) { //just in case application terminate before linphone core initialization
linphone_core_destroy(theLinphoneCore);
theLinphoneCore = nil;
}
SCNetworkReachabilityUnscheduleFromRunLoop(proxyReachability, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
CFRelease(proxyReachability);
proxyReachability=nil;
}
if (sTunnelMgr) {
delete sTunnelMgr;
sTunnelMgr=NULL;
@ -624,6 +619,12 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
[[NSUserDefaults standardUserDefaults] synchronize];//sync before loading config
[ self doLinphoneConfiguration:nil];
proxyReachability=SCNetworkReachabilityCreateWithName(nil, "linphone.org");
proxyReachabilityContext.info=self;
SCNetworkReachabilitySetCallback(proxyReachability, (SCNetworkReachabilityCallBack)networkReachabilityCallBack,&proxyReachabilityContext);
SCNetworkReachabilityScheduleWithRunLoop(proxyReachability, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(doLinphoneConfiguration:)
name:NSUserDefaultsDidChangeNotification object:nil];

3
README
View file

@ -21,3 +21,6 @@ In case you upgrade your IOS SDK, you may force configure by using make targets
Libraries are available from liblinphone-sdk/
AMR plugin
liblinphone-sdk contains Linphone ARM pluging. As AMR may require to pay for patents, it is not enabled unless Linphone for iphone is compiled with gcc flag HAVE_AMR.