[svn-commits] file: trunk r396319 - /trunk/res/
    SVN commits to the Digium repositories 
    svn-commits at lists.digium.com
       
    Tue Aug  6 07:39:30 CDT 2013
    
    
  
Author: file
Date: Tue Aug  6 07:39:27 2013
New Revision: 396319
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=396319
Log:
Fix crash in res_pjsip_outbound_registration when the remote server can not be resolved.
This crash was caused by decrementing the reference count of a newly created message when
it should not be. This change fixes that but also fixes all other cases where this was
incorrectly done.
(closes issue ASTERISK-22188)
Reported by: Kinsey Moore
Modified:
    trunk/res/res_pjsip_exten_state.c
    trunk/res/res_pjsip_messaging.c
    trunk/res/res_pjsip_notify.c
    trunk/res/res_pjsip_outbound_registration.c
Modified: trunk/res/res_pjsip_exten_state.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_exten_state.c?view=diff&rev=396319&r1=396318&r2=396319
==============================================================================
--- trunk/res/res_pjsip_exten_state.c (original)
+++ trunk/res/res_pjsip_exten_state.c Tue Aug  6 07:39:27 2013
@@ -250,7 +250,6 @@
 
 	if (ast_sip_subscription_send_request(exten_state_sub->sip_sub, tdata) != PJ_SUCCESS) {
 		ast_log(LOG_WARNING, "Unable to send NOTIFY request\n");
-		pjsip_tx_data_dec_ref(tdata);
 	}
 }
 
Modified: trunk/res/res_pjsip_messaging.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_messaging.c?view=diff&rev=396319&r1=396318&r2=396319
==============================================================================
--- trunk/res/res_pjsip_messaging.c (original)
+++ trunk/res/res_pjsip_messaging.c Tue Aug  6 07:39:27 2013
@@ -484,7 +484,6 @@
 	update_from(tdata, mdata->from);
 	vars_to_headers(mdata->msg, tdata);
 	if (ast_sip_send_request(tdata, NULL, endpoint)) {
-		pjsip_tx_data_dec_ref(tdata);
 		ast_log(LOG_ERROR, "SIP MESSAGE - Could not send request\n");
 		return -1;
 	}
Modified: trunk/res/res_pjsip_notify.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_notify.c?view=diff&rev=396319&r1=396318&r2=396319
==============================================================================
--- trunk/res/res_pjsip_notify.c (original)
+++ trunk/res/res_pjsip_notify.c Tue Aug  6 07:39:27 2013
@@ -440,7 +440,6 @@
 	data->build_notify(tdata, data->info);
 
 	if (ast_sip_send_request(tdata, NULL, data->endpoint)) {
-		pjsip_tx_data_dec_ref(tdata);
 		ast_log(LOG_ERROR, "SIP NOTIFY - Unable to send request for "
 			"contact %s\n",	contact->uri);
 		return -1;
Modified: trunk/res/res_pjsip_outbound_registration.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_outbound_registration.c?view=diff&rev=396319&r1=396318&r2=396319
==============================================================================
--- trunk/res/res_pjsip_outbound_registration.c (original)
+++ trunk/res/res_pjsip_outbound_registration.c Tue Aug  6 07:39:27 2013
@@ -221,7 +221,6 @@
 	ao2_ref(client_state, +1);
 	if (pjsip_regc_send(client_state->client, tdata) != PJ_SUCCESS) {
 		ao2_ref(client_state, -1);
-		pjsip_tx_data_dec_ref(tdata);
 	}
 
 	return 0;
    
    
More information about the svn-commits
mailing list