mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-27 13:16:21 +00:00
Fix crash when using a phone number as username in the wizard.
This commit is contained in:
parent
990a59791a
commit
3dfd10bbe0
1 changed files with 2 additions and 2 deletions
|
|
@ -388,13 +388,13 @@ static UICompositeViewDescription *compositeDescription = nil;
|
||||||
if(server == nil) {
|
if(server == nil) {
|
||||||
server = domain;
|
server = domain;
|
||||||
}
|
}
|
||||||
|
LinphoneProxyConfig* proxyCfg = linphone_core_create_proxy_config([LinphoneManager getLc]);
|
||||||
char normalizedUserName[256];
|
char normalizedUserName[256];
|
||||||
LinphoneAddress* linphoneAddress = linphone_address_new("sip:user@domain.com");
|
LinphoneAddress* linphoneAddress = linphone_address_new("sip:user@domain.com");
|
||||||
linphone_proxy_config_normalize_number(NULL, [username cStringUsingEncoding:[NSString defaultCStringEncoding]], normalizedUserName, sizeof(normalizedUserName));
|
linphone_proxy_config_normalize_number(proxyCfg, [username cStringUsingEncoding:[NSString defaultCStringEncoding]], normalizedUserName, sizeof(normalizedUserName));
|
||||||
linphone_address_set_username(linphoneAddress, normalizedUserName);
|
linphone_address_set_username(linphoneAddress, normalizedUserName);
|
||||||
linphone_address_set_domain(linphoneAddress, [domain UTF8String]);
|
linphone_address_set_domain(linphoneAddress, [domain UTF8String]);
|
||||||
const char* identity = linphone_address_as_string_uri_only(linphoneAddress);
|
const char* identity = linphone_address_as_string_uri_only(linphoneAddress);
|
||||||
LinphoneProxyConfig* proxyCfg = linphone_core_create_proxy_config([LinphoneManager getLc]);
|
|
||||||
LinphoneAuthInfo* info = linphone_auth_info_new([username UTF8String], NULL, [password UTF8String], NULL, NULL);
|
LinphoneAuthInfo* info = linphone_auth_info_new([username UTF8String], NULL, [password UTF8String], NULL, NULL);
|
||||||
linphone_proxy_config_set_identity(proxyCfg, identity);
|
linphone_proxy_config_set_identity(proxyCfg, identity);
|
||||||
linphone_proxy_config_set_server_addr(proxyCfg, [server UTF8String]);
|
linphone_proxy_config_set_server_addr(proxyCfg, [server UTF8String]);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue