Module: sip-router
Branch: master
Commit: 96b29f927f8a8dc9a187ec17a9d6aa7547d3142c
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=96b29f9…
Author: Jason Penton <jason.penton(a)gmail.com>
Committer: Jason Penton <jason.penton(a)gmail.com>
Date: Wed Nov 19 16:13:25 2014 +0200
modules/ims_usrloc_scscf: fixed bug with contact counter per IMPU
---
modules/ims_usrloc_scscf/impurecord.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/ims_usrloc_scscf/impurecord.c
b/modules/ims_usrloc_scscf/impurecord.c
index 6c636ff..6f6ead2 100644
--- a/modules/ims_usrloc_scscf/impurecord.c
+++ b/modules/ims_usrloc_scscf/impurecord.c
@@ -900,8 +900,8 @@ int link_contact_to_impu(impurecord_t* impu, ucontact_t* contact, int
write_to_d
LM_DBG("contact [%.*s] needs to be linked to impu [%.*s] at position %d\n",
contact->c.len, contact->c.s, impu->public_identity.len,
impu->public_identity.s, i);
if (overwrite)
unlink_contact_from_impu(impu, impu->newcontacts[i], write_to_db); //unlink
the contact we are overwriting
- else
- impu->num_contacts = i+1;
+
+ impu->num_contacts = i+1; //we always bump this - as unlink (in overwrite would
have decremented)
impu->newcontacts[i] = contact;