[asterisk-commits] mmichelson: trunk r397142 - in /trunk: ./ channels/ channels/sip/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Aug 20 11:25:35 CDT 2013
Author: mmichelson
Date: Tue Aug 20 11:25:33 2013
New Revision: 397142
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=397142
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
........
Merged revisions 397133 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
trunk/ (props changed)
trunk/channels/chan_sip.c
trunk/channels/sip/dialplan_functions.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=397142&r1=397141&r2=397142
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Aug 20 11:25:33 2013
@@ -228,6 +228,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: trunk/channels/sip/dialplan_functions.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sip/dialplan_functions.c?view=diff&rev=397142&r1=397141&r2=397142
==============================================================================
--- trunk/channels/sip/dialplan_functions.c (original)
+++ trunk/channels/sip/dialplan_functions.c Tue Aug 20 11:25:33 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