forked from mirrors/linphone-iphone
only use www.linphone.org for testing network recheability
This commit is contained in:
parent
c788cfc1e9
commit
1915367124
1 changed files with 12 additions and 9 deletions
|
|
@ -398,9 +398,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"
|
||||
|
|
@ -410,12 +407,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
otherButtonTitles:@"Never remind",nil];
|
||||
[error show];
|
||||
}
|
||||
|
||||
proxyReachability=SCNetworkReachabilityCreateWithName(nil, "linphone.org");
|
||||
}
|
||||
proxyReachabilityContext.info=self;
|
||||
SCNetworkReachabilitySetCallback(proxyReachability, (SCNetworkReachabilityCallBack)networkReachabilityCallBack,&proxyReachabilityContext);
|
||||
SCNetworkReachabilityScheduleWithRunLoop(proxyReachability, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
|
||||
|
||||
//Configure Codecs
|
||||
|
||||
|
|
@ -461,7 +453,12 @@ 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;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//**********************BG mode management*************************///////////
|
||||
|
|
@ -600,6 +597,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];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue