mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-02 19:29:27 +00:00
Fix for #1821: Entering a real SIP address in Proxy field makes it crash
This commit is contained in:
parent
3f90f37ada
commit
bd58dca1e0
1 changed files with 9 additions and 3 deletions
|
|
@ -293,6 +293,10 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
[alertview release];
|
||||
}
|
||||
|
||||
+ (BOOL)hasSipPrefix:(NSString*)str {
|
||||
return [str hasPrefix:@"sip:"] || [str hasPrefix:@"sips:"];
|
||||
}
|
||||
|
||||
- (void)synchronizeAccount {
|
||||
LinphoneCore *lc = [LinphoneManager getLc];
|
||||
LpConfig* conf = linphone_core_get_config(lc);
|
||||
|
|
@ -352,9 +356,11 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
if( isWifiOnly && [LinphoneManager instance].connectivity == wwan ) expire = 0;
|
||||
|
||||
if ((!proxyAddress || [proxyAddress length] <1 ) && domain) {
|
||||
proxyAddress = [NSString stringWithFormat:@"sip:%@",domain] ;
|
||||
} else {
|
||||
proxyAddress = [NSString stringWithFormat:@"sip:%@",proxyAddress] ;
|
||||
proxyAddress = domain;
|
||||
}
|
||||
|
||||
if( ![LinphoneCoreSettingsStore hasSipPrefix:proxyAddress] ) {
|
||||
proxyAddress = [NSString stringWithFormat:@"sip:%@",proxyAddress];
|
||||
}
|
||||
|
||||
char* proxy = ms_strdup([proxyAddress cStringUsingEncoding:[NSString defaultCStringEncoding]]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue