Module: kamailio
Branch: master
Commit: 2b1e895e1a319b932a449c703a974c6ab8aafc6e
URL:
https://github.com/kamailio/kamailio/commit/2b1e895e1a319b932a449c703a974c6…
Author: Christoph Valentin <christoph.valentin(a)kapsch.net>
Committer: Christoph Valentin <christoph.valentin(a)kapsch.net>
Date: 2018-05-22T17:12:10+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/2b1e895e1a319b932a449c703a974c6…
Patch:
https://github.com/kamailio/kamailio/commit/2b1e895e1a319b932a449c703a974c6…
---
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);