Module: sip-router
Branch: master
Commit: 52d727dc249a88b31348b008045cc6071ab215a7
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=52d727d…
Author: Carlos Ruiz Diaz <carlos.ruizdiaz(a)gmail.com>
Committer: Carlos Ruiz Diaz <carlos.ruizdiaz(a)gmail.com>
Date: Wed Dec 18 15:28:39 2013 -0300
ims_registrar_scscf: fix crash caused by an uninitialized AVP
---
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);