[sr-dev] git:master:e102306f: ims_registrar_pcscf: fixed removal of contacts on de-registration

Dragos Vingarzan dragos at corenetdynamics.com
Thu Jul 21 20:37:58 CEST 2016


Module: kamailio
Branch: master
Commit: e102306fe779b8d11ce2151e96d56b7d96c9e308
URL: https://github.com/kamailio/kamailio/commit/e102306fe779b8d11ce2151e96d56b7d96c9e308

Author: Dragos Vingarzan <dragos at corenetdynamics.com>
Committer: Dragos Vingarzan <dragos at corenetdynamics.com>
Date: 2016-07-20T18:51:27+02:00

ims_registrar_pcscf: fixed removal of contacts on de-registration

- the code was there, but I guess some API changes resulted in temporary
commented-out code; this uses the new parameters and seems to fix the
issue.

---

Modified: modules/ims_registrar_pcscf/save.c

---

Diff:  https://github.com/kamailio/kamailio/commit/e102306fe779b8d11ce2151e96d56b7d96c9e308.diff
Patch: https://github.com/kamailio/kamailio/commit/e102306fe779b8d11ce2151e96d56b7d96c9e308.patch

---

diff --git a/modules/ims_registrar_pcscf/save.c b/modules/ims_registrar_pcscf/save.c
index 5a98d36..fbceae3 100644
--- a/modules/ims_registrar_pcscf/save.c
+++ b/modules/ims_registrar_pcscf/save.c
@@ -183,9 +183,9 @@ static inline int update_contacts(struct sip_msg *req,struct sip_msg *rpl, udoma
 					LM_DBG("contact already exists and is in state (%d) : [%s]\n",pcontact->reg_state, reg_state_to_string(pcontact->reg_state));
 					if ((expires-local_time_now)<=0) { //remove contact - de-register
 						LM_DBG("This is a de-registration for contact <%.*s>\n", c->uri.len, c->uri.s);
-//						if (ul.delete_pcontact(_d, &c->uri, &ci.received_host, ci.received_port, pcontact) != 0) {
-//							LM_ERR("failed to delete pcscf contact <%.*s>\n", c->uri.len, c->uri.s);
-//						}
+						if (ul.delete_pcontact(_d, pcontact) != 0) {
+							LM_ERR("failed to delete pcscf contact <%.*s>\n", c->uri.len, c->uri.s);
+						}
                                                 //TODO_LATEST replace above
 					} else { //update contact
 						LM_DBG("Updating contact: <%.*s>, old expires: %li, new expires: %i which is in %i seconds\n", c->uri.len, c->uri.s,




More information about the sr-dev mailing list