Module: sip-router
Branch: master
Commit: 7d273d96a24527e029349f747203f1bbcf65c7b1
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7d273d9…
Author: Jason Penton <jason.penton(a)gmail.com>
Committer: Jason Penton <jason.penton(a)gmail.com>
Date: Wed Oct 29 17:05:17 2014 +0200
modules/ims_usrloc_scscf: add callback when contact is deleted/removed
---
modules/ims_usrloc_scscf/impurecord.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/modules/ims_usrloc_scscf/impurecord.c
b/modules/ims_usrloc_scscf/impurecord.c
index 9ff1dad..4bc82a1 100644
--- a/modules/ims_usrloc_scscf/impurecord.c
+++ b/modules/ims_usrloc_scscf/impurecord.c
@@ -938,6 +938,12 @@ int unlink_contact_from_impu(impurecord_t* impu, ucontact_t* contact,
int write_
} else {
if (ptr == contact) {
LM_DBG("unlinking contact [%.*s] from impu [%.*s]\n", contact->c.len,
contact->c.s, impu->public_identity.len, impu->public_identity.s);
+
+ if (exists_ulcb_type(impu->cbs, UL_IMPU_DELETE_CONTACT)) {
+ LM_DBG("Running callback UL_IMPU_DELETE_CONTACT for contact [%.*s] and impu
[%.*s]\n", impu->public_identity.len, impu->public_identity.s, ptr->c.len,
ptr->c.s);
+ run_ul_callbacks(impu->cbs, UL_IMPU_DELETE_CONTACT, impu, ptr);
+ }
+
found = 1;
impu->newcontacts[i]=0;
impu->num_contacts--;