Commit b050b229 authored by Sylvain Berfini's avatar Sylvain Berfini
Browse files

Fix issue when using email as username

parent 573f5305
......@@ -277,18 +277,14 @@ LinphoneAddress *guess_contact_for_register(LinphoneProxyConfig *obj){
const char *localip = NULL;
char *tmp;
LinphoneAddress *contact=linphone_address_new(obj->reg_identity);
if (obj->contact_params)
tmp=ms_strdup_printf("<sip:%s@%s;%s>",linphone_address_get_username(contact)
,linphone_address_get_domain(contact)
,obj->contact_params);
tmp = ms_strdup_printf("%s;%s", obj->reg_identity, obj->contact_params);
else
tmp=ms_strdup_printf("<sip:%s@%s>",linphone_address_get_username(contact)
,linphone_address_get_domain(contact));
tmp = strdup(obj->reg_identity);
linphone_address_destroy(contact);
contact=linphone_address_new(tmp);
LinphoneAddress *contact = linphone_address_new(tmp);
if (!contact) {
ms_error("No valid contact_params for [%s]",linphone_address_get_domain(proxy));
return NULL;
......
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