Module: kamailio
Branch: 5.1
Commit: 7de9b687355f714d327b3c74a0fc63c85c9d1aee
URL:
https://github.com/kamailio/kamailio/commit/7de9b687355f714d327b3c74a0fc63c…
Author: Christoph Valentin <christoph.valentin(a)kapsch.net>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-06-01T10:13:20+02:00
ims_usrloc_scscf: bugfix Contct is removed when old Contct expires
in function unlink_contact_from_impu() (in file impurecord.c) an
assignment "=" is used instead of a comparision operator "==". This
leads to mess, when old contact expires.
---
Modified: src/modules/ims_usrloc_scscf/impurecord.c
---
Diff:
https://github.com/kamailio/kamailio/commit/7de9b687355f714d327b3c74a0fc63c…
Patch:
https://github.com/kamailio/kamailio/commit/7de9b687355f714d327b3c74a0fc63c…
---
diff --git a/src/modules/ims_usrloc_scscf/impurecord.c
b/src/modules/ims_usrloc_scscf/impurecord.c
index 9cee5bc765..6510d85aa1 100644
--- a/src/modules/ims_usrloc_scscf/impurecord.c
+++ b/src/modules/ims_usrloc_scscf/impurecord.c
@@ -1239,7 +1239,7 @@ int unlink_contact_from_impu(impurecord_t* impu, ucontact_t*
contact, int write_
impucontact = impu->linked_contacts.head;
while (impucontact) {
- if ((contact = impucontact->contact)) {
+ if ((contact == impucontact->contact)) {
remove_impucontact_from_list(impu, impucontact);
if (write_to_db && db_mode == WRITE_THROUGH &&
(db_unlink_contact_from_impu(impu, contact) != 0)) {
LM_ERR("Failed to un-link DB contact [%.*s] from IMPU [%.*s]...continuing but db
will be out of sync!\n", contact->c.len, contact->c.s,
impu->public_identity.len, impu->public_identity.s);