mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-29 09:09:21 +00:00
Fix get_identity of account_creator
This commit is contained in:
parent
47322a211d
commit
a0d1ddf830
1 changed files with 4 additions and 2 deletions
|
|
@ -77,14 +77,16 @@ static char* _get_identity(const LinphoneAccountCreator *creator) {
|
|||
char *identity = NULL;
|
||||
if ((creator->username || creator->phone_number)) {
|
||||
//we must escape username
|
||||
LinphoneProxyConfig* proxy = creator->proxy_cfg;
|
||||
LinphoneProxyConfig* proxy = linphone_core_create_proxy_config(creator->core);
|
||||
LinphoneAddress* addr;
|
||||
|
||||
addr = linphone_proxy_config_normalize_sip_uri(proxy, creator->username ? creator->username : creator->phone_number);
|
||||
if (addr == NULL) return NULL;
|
||||
if (addr == NULL) goto end;
|
||||
|
||||
identity = linphone_address_as_string(addr);
|
||||
linphone_address_unref(addr);
|
||||
end:
|
||||
linphone_proxy_config_destroy(proxy);
|
||||
}
|
||||
return identity;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue