Browse code

usrloc: refresh call-id value in case of update of location record

- related to FS#448

(cherry picked from commit c2b334bf41cbe6fa7b7e15d825dca1fa36c33770)

Daniel-Constantin Mierla authored on 17/07/2014 17:13:42
Showing 1 changed files
... ...
@@ -270,12 +270,14 @@ int mem_update_ucontact(ucontact_t* _c, ucontact_info_t* _ci)
270 270
 
271 271
 	if(_ci->instance.s!=NULL && _ci->instance.len>0)
272 272
 	{
273
-		/* when we have instance set, update contact address and call-id */
273
+		/* when we have instance set, update contact address */
274 274
 		if(_ci->c!=NULL && _ci->c->s!=NULL && _ci->c->len>0)
275 275
 			update_str( &_c->c, _ci->c);
276
-		if(_ci->callid!=NULL && _ci->callid->s!=NULL && _ci->callid->len>0)
277
-			update_str( &_c->callid, _ci->callid);
278 276
 	}
277
+
278
+	/* refresh call-id */
279
+	if(_ci->callid!=NULL && _ci->callid->s!=NULL && _ci->callid->len>0)
280
+		update_str( &_c->callid, _ci->callid);
279 281
 	update_str( &_c->user_agent, _ci->user_agent);
280 282
 
281 283
 	if (_ci->received.s && _ci->received.len) {