Commit 3c25299e authored by jehan's avatar jehan
Browse files

allow contact to be updated from dialog state eraly to confirmed

parent 85ec6864
...@@ -211,12 +211,16 @@ int belle_sip_dialog_establish_full(belle_sip_dialog_t *obj, belle_sip_request_t ...@@ -211,12 +211,16 @@ int belle_sip_dialog_establish_full(belle_sip_dialog_t *obj, belle_sip_request_t
if (obj->is_server && strcmp(belle_sip_request_get_method(req),"INVITE")==0){ if (obj->is_server && strcmp(belle_sip_request_get_method(req),"INVITE")==0){
belle_sip_dialog_init_200Ok_retrans(obj,resp); belle_sip_dialog_init_200Ok_retrans(obj,resp);
} else if (!obj->is_server && !obj->remote_target) { } else if (!obj->is_server ) {
if (!ct) { if (!ct && !obj->remote_target) {
belle_sip_error("Missing contact header in resp [%p] cannot set remote target for dialog [%p]",resp,obj); belle_sip_error("Missing contact header in resp [%p] cannot set remote target for dialog [%p]",resp,obj);
return -1; return -1;
} }
obj->remote_target=(belle_sip_header_address_t*)belle_sip_object_ref(ct); if (ct) {
/*remote Contact header may have changed between early dialog to confirmed*/
if (obj->remote_target) belle_sip_object_unref(obj->remote_target);
obj->remote_target=(belle_sip_header_address_t*)belle_sip_object_ref(ct);
}
} }
/*update to tag*/ /*update to tag*/
set_to_tag(obj,to); set_to_tag(obj,to);
......
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