[asterisk-commits] file: branch 1.6.1 r189352 - in /branches/1.6.1: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 20 12:08:31 CDT 2009


Author: file
Date: Mon Apr 20 12:08:26 2009
New Revision: 189352

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=189352
Log:
Merged revisions 189350 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r189350 | file | 2009-04-20 14:05:15 -0300 (Mon, 20 Apr 2009) | 10 lines
  
  Fix a bug with non-UDP connections that caused dialogs to not get freed.
  
  This issue crept up because of a reference count issue on non-UDP based dialogs.
  The dialog reference count was increased when transmitting a packet reliably but never
  decreased. This caused the dialog structure to hang around despite being unlinked from
  the dialogs container.
  
  (closes issue #14919)
  Reported by: vrban
........

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/channels/chan_sip.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/channels/chan_sip.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/channels/chan_sip.c?view=diff&rev=189352&r1=189351&r2=189352
==============================================================================
--- branches/1.6.1/channels/chan_sip.c (original)
+++ branches/1.6.1/channels/chan_sip.c Mon Apr 20 12:08:26 2009
@@ -3160,7 +3160,7 @@
 	/* I removed the code from retrans_pkt that does the same thing so it doesn't get loaded into the scheduler */
 	/* According to the RFC some packets need to be retransmitted even if its TCP, so this needs to get revisited */
 	if (!(p->socket.type & SIP_TRANSPORT_UDP)) {
-		xmitres = __sip_xmit(dialog_ref(p, "pasing dialog ptr into callback..."), data, len);	/* Send packet */
+		xmitres = __sip_xmit(p, data, len);	/* Send packet */
 		if (xmitres == XMIT_ERROR) {	/* Serious network trouble, no need to try again */
 			append_history(p, "XmitErr", "%s", fatal ? "(Critical)" : "(Non-critical)");
 			return AST_FAILURE;
@@ -3202,6 +3202,7 @@
 		ast_log(LOG_ERROR, "Serious Network Trouble; __sip_xmit returns error for pkt data\n");
 		AST_SCHED_DEL(sched, pkt->retransid);
 		p->packets = pkt->next;
+		pkt->owner = dialog_unref(pkt->owner,"pkt is being freed, its dialog ref is dead now");
 		ast_free(pkt->data);
 		ast_free(pkt);
 		return AST_FAILURE;




More information about the asterisk-commits mailing list