Module: sip-router
Branch: master
Commit: c2b334bf41cbe6fa7b7e15d825dca1fa36c33770
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c2b334b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Jul 17 19:13:42 2014 +0200
usrloc: refresh call-id value in case of update of location record
- related to FS#448
---
modules/usrloc/ucontact.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/modules/usrloc/ucontact.c b/modules/usrloc/ucontact.c
index c0c48f2..ead8e40 100644
--- a/modules/usrloc/ucontact.c
+++ b/modules/usrloc/ucontact.c
@@ -270,12 +270,14 @@ int mem_update_ucontact(ucontact_t* _c, ucontact_info_t* _ci)
if(_ci->instance.s!=NULL && _ci->instance.len>0)
{
- /* when we have instance set, update contact address and call-id */
+ /* when we have instance set, update contact address */
if(_ci->c!=NULL && _ci->c->s!=NULL && _ci->c->len>0)
update_str( &_c->c, _ci->c);
- if(_ci->callid!=NULL && _ci->callid->s!=NULL &&
_ci->callid->len>0)
- update_str( &_c->callid, _ci->callid);
}
+
+ /* refresh call-id */
+ if(_ci->callid!=NULL && _ci->callid->s!=NULL &&
_ci->callid->len>0)
+ update_str( &_c->callid, _ci->callid);
update_str( &_c->user_agent, _ci->user_agent);
if (_ci->received.s && _ci->received.len) {