[sr-dev] git:master:057dd97e: modules/ims_registrar_scscf: provide protection for re-registration of implicit set

jaybeepee jason.penton at gmail.com
Tue Mar 15 12:40:48 CET 2016


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

Author: jaybeepee <jason.penton at gmail.com>
Committer: jaybeepee <jason.penton at gmail.com>
Date: 2016-03-15T13:40:32+02:00

modules/ims_registrar_scscf: provide protection for re-registration of implicit set

---

Modified: modules/ims_registrar_scscf/save.c

---

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

---

diff --git a/modules/ims_registrar_scscf/save.c b/modules/ims_registrar_scscf/save.c
index da1dc69..a33dbcf 100644
--- a/modules/ims_registrar_scscf/save.c
+++ b/modules/ims_registrar_scscf/save.c
@@ -835,19 +835,23 @@ int update_contacts(struct sip_msg* msg, udomain_t* _d,
                         continue;
                     }
 
+                    ul.lock_udomain(_d, &pi->public_identity);
                     //update the implicit IMPU with the new data
                     if (ul.update_impurecord(_d, &pi->public_identity, 0,
                             reg_state, -1 /*do not change send sar on delete */, pi->barring, 0, s, ccf1, ccf2, ecf1, ecf2,
                             &impu_rec) != 0) {
                         LM_ERR("Unable to update implicit impurecord for <%.*s>.... continuing\n", pi->public_identity.len, pi->public_identity.s);
+                        ul.unlock_udomain(_d, &pi->public_identity);
                         continue;
                     }
 
                     //update the contacts for the explicit IMPU
                     if (update_contacts_helper(msg, impu_rec, assignment_type, expires_hdr) != 0) {
                         LM_ERR("Failed trying to update contacts for re-registration of implicit IMPU <%.*s>.......continuing\n", pi->public_identity.len, pi->public_identity.s);
+                        ul.unlock_udomain(_d, &pi->public_identity);
                         continue;
                     }
+                    ul.unlock_udomain(_d, &pi->public_identity);
                 }
             }
             ul.lock_subscription(subscription);




More information about the sr-dev mailing list