Module: sip-router
Branch: 4.1
Commit: d6480f98aef45b8c569ef9edf90c6cf1604cc2f8
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d6480f9…
Author: Carlos Ruiz Diaz <carlos.ruizdiaz(a)gmail.com>
Committer: Hugh Waite <hugh.waite(a)crocodile-rcs.com>
Date: Wed Dec 18 15:28:39 2013 -0300
ims_registrar_scscf: fix crash caused by an uninitialized AVP
(cherry picked from commit 52d727dc249a88b31348b008045cc6071ab215a7)
---
modules/ims_registrar_scscf/cxdx_sar.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/modules/ims_registrar_scscf/cxdx_sar.c
b/modules/ims_registrar_scscf/cxdx_sar.c
index 7ff976b..122edc4 100644
--- a/modules/ims_registrar_scscf/cxdx_sar.c
+++ b/modules/ims_registrar_scscf/cxdx_sar.c
@@ -141,6 +141,13 @@ void async_cdp_callback(int is_timeout, void *param, AAAMessage *saa,
long elaps
goto error_no_send;
}
+ set_avp_list(AVP_TRACK_FROM | AVP_CLASS_URI, &t->uri_avps_from);
+ set_avp_list(AVP_TRACK_TO | AVP_CLASS_URI, &t->uri_avps_to);
+ set_avp_list(AVP_TRACK_FROM | AVP_CLASS_USER, &t->user_avps_from);
+ set_avp_list(AVP_TRACK_TO | AVP_CLASS_USER, &t->user_avps_to);
+ set_avp_list(AVP_TRACK_FROM | AVP_CLASS_DOMAIN, &t->domain_avps_from);
+ set_avp_list(AVP_TRACK_TO | AVP_CLASS_DOMAIN, &t->domain_avps_to);
+
get_act_time();
if (is_timeout) {
@@ -253,12 +260,6 @@ done:
if (data->sar_assignment_type != AVP_IMS_SAR_UNREGISTERED_USER)
reg_send_reply_transactional(t->uas.request, data->contact_header, t);
LM_DBG("DBG:SAR Async CDP callback: ... Done resuming transaction\n");
- set_avp_list(AVP_TRACK_FROM | AVP_CLASS_URI, &t->uri_avps_from);
- set_avp_list(AVP_TRACK_TO | AVP_CLASS_URI, &t->uri_avps_to);
- set_avp_list(AVP_TRACK_FROM | AVP_CLASS_USER, &t->user_avps_from);
- set_avp_list(AVP_TRACK_TO | AVP_CLASS_USER, &t->user_avps_to);
- set_avp_list(AVP_TRACK_FROM | AVP_CLASS_DOMAIN, &t->domain_avps_from);
- set_avp_list(AVP_TRACK_TO | AVP_CLASS_DOMAIN, &t->domain_avps_to);
create_return_code(result);
@@ -278,6 +279,8 @@ done:
error:
if (data->sar_assignment_type != AVP_IMS_SAR_UNREGISTERED_USER)
reg_send_reply_transactional(t->uas.request, data->contact_header, t);
+
+ create_return_code(-2);
error_no_send: //if we don't have the transaction then we can't send a
transaction response
update_stat(rejected_registrations, 1);