[sr-dev] git:master:6756e95f: Merge pull request #630 from tdimitrov/reregister

jaybeepee jason.penton at gmail.com
Mon May 23 12:26:46 CEST 2016


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

Author: jaybeepee <jason.penton at gmail.com>
Committer: jaybeepee <jason.penton at gmail.com>
Date: 2016-05-23T12:26:40+02:00

Merge pull request #630 from tdimitrov/reregister

ims_registar_scscf: Fix subscr data handling in SAA when no data received from HSS

---

Modified: modules/ims_registrar_scscf/cxdx_sar.c

---

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

---

diff --git a/modules/ims_registrar_scscf/cxdx_sar.c b/modules/ims_registrar_scscf/cxdx_sar.c
index eac67fc..4b88ed7 100644
--- a/modules/ims_registrar_scscf/cxdx_sar.c
+++ b/modules/ims_registrar_scscf/cxdx_sar.c
@@ -238,18 +238,23 @@ void async_cdp_callback(int is_timeout, void *param, AAAMessage *saa, long elaps
         }
 
         if (data->sar_assignment_type == AVP_IMS_SAR_REGISTRATION || data->sar_assignment_type == AVP_IMS_SAR_RE_REGISTRATION) {
-            if (build_p_associated_uri(s) != 0) {
-                LM_ERR("Unable to build p_associated_uri\n");
-                rerrno = R_SAR_FAILED;
-                goto error;
+            if (s) {
+                if (build_p_associated_uri(s) != 0) {
+                    LM_ERR("Unable to build p_associated_uri\n");
+                    rerrno = R_SAR_FAILED;
+                    goto error;
+                }
             }
+
         }
 
-        //here we update the contacts and also build the new contact header for the 200 OK reply
-        if (update_contacts(t->uas.request, data->domain, &data->public_identity, data->sar_assignment_type, &s, &ccf1, &ccf2, &ecf1, &ecf2, &data->contact_header) <= 0) {
-            LM_ERR("Error processing REGISTER\n");
-            rerrno = R_SAR_FAILED;
-            goto error;
+        if (s) {
+            //here we update the contacts and also build the new contact header for the 200 OK reply
+            if (update_contacts_new(t->uas.request, data->domain, &data->public_identity, data->sar_assignment_type, &s, &ccf1, &ccf2, &ecf1, &ecf2, &data->contact_header) <= 0) {
+                LM_ERR("Error processing REGISTER\n");
+                rerrno = R_SAR_FAILED;
+                goto error;
+            }
         }
         
         if (data->contact_header) {




More information about the sr-dev mailing list