[sr-dev] git:master:f26152e7: ims_registar_scscf: Fix subscr data handling in SAA

Tsvetomir Dimitrov tsv.dimitrov at gmail.com
Mon May 23 12:26:45 CEST 2016


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

Author: Tsvetomir Dimitrov <tsv.dimitrov at gmail.com>
Committer: Tsvetomir Dimitrov <tsv.dimitrov at gmail.com>
Date: 2016-05-20T16:55:27+03:00

ims_registar_scscf: Fix subscr data handling in SAA

During re-registration, in SAR, User-Data-Already-Available AVP is set.
However in SAA handling, error is generated if User-Data is not sent by
the HSS. This behavior is not correct.
For reference, check TS 29.228, Table 6.1.2.1.

---

Modified: modules/ims_registrar_scscf/cxdx_sar.c

---

Diff:  https://github.com/kamailio/kamailio/commit/f26152e77648fb0c25ec0c80bc22a3890a4975cd.diff
Patch: https://github.com/kamailio/kamailio/commit/f26152e77648fb0c25ec0c80bc22a3890a4975cd.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