[asterisk-commits] mmichelson: branch 11 r397133 - in /branches/11: ./ channels/ channels/sip/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 20 11:23:13 CDT 2013


Author: mmichelson
Date: Tue Aug 20 11:23:11 2013
New Revision: 397133

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=397133
Log:
Fix refcounting of sip_pvt in test_sip_rtpqos test and unlink it from the list of pvts.

(closes issue ASTERISK-22248)
reported by Corey Farrell
patches:
	test_sip_rtpqos.patch uploaded by Corey Farrell (license #5909)
........

Merged revisions 397112 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/11/   (props changed)
    branches/11/channels/chan_sip.c
    branches/11/channels/sip/dialplan_functions.c

Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/11/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_sip.c?view=diff&rev=397133&r1=397132&r2=397133
==============================================================================
--- branches/11/channels/chan_sip.c (original)
+++ branches/11/channels/chan_sip.c Tue Aug 20 11:23:11 2013
@@ -217,6 +217,7 @@
 #include <regex.h>
 #include <inttypes.h>
 
+#define REF_DEBUG 1
 #include "asterisk/network.h"
 #include "asterisk/paths.h"	/* need ast_config_AST_SYSTEM_NAME */
 /*

Modified: branches/11/channels/sip/dialplan_functions.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/sip/dialplan_functions.c?view=diff&rev=397133&r1=397132&r2=397133
==============================================================================
--- branches/11/channels/sip/dialplan_functions.c (original)
+++ branches/11/channels/sip/dialplan_functions.c Tue Aug 20 11:23:11 2013
@@ -353,7 +353,7 @@
 		goto done;
 	}
 	ast_channel_tech_set(chan, &sip_tech);
-	ast_channel_tech_pvt_set(chan, p);
+	ast_channel_tech_pvt_set(chan, dialog_ref(p, "Give the owner channel a reference to the dialog"));
 	p->owner = chan;
 
 	varstr = ast_str_create(16);
@@ -397,8 +397,9 @@
 	ast_free(varstr);
 	ast_free(buffer);
 
-	/* This unref will take care of destroying the channel, RTP instance, and SIP pvt */
+	/* This unlink and unref will take care of destroying the channel, RTP instance, and SIP pvt */
 	if (p) {
+		dialog_unlink_all(p);
 		dialog_unref(p, "Destroy test object");
 	}
 	ast_rtp_engine_unregister(&test_engine);




More information about the asterisk-commits mailing list