Commit 0b69dbaa authored by Gautier Pelloux-Prayer's avatar Gautier Pelloux-Prayer
Browse files

account_creator.c: fix crash when user enters a port in domain

parent 5e714f46
......@@ -170,9 +170,13 @@ static char* _get_identity(const LinphoneAccountCreator *creator) {
//we must escape username
LinphoneProxyConfig* proxy = linphone_proxy_config_new();
LinphoneAddress* addr;
linphone_proxy_config_set_identity(proxy, "");
// creator->domain may contain some port or some transport (eg.;transport=tcp),
// we will accept that
char * tmpidentity = ms_strdup_printf("sip:username@%s", creator->domain);
linphone_proxy_config_set_identity(proxy, tmpidentity);
addr = linphone_proxy_config_normalize_sip_uri(proxy, creator->username);
linphone_address_set_domain(addr, creator->domain);
identity = linphone_address_as_string(addr);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment