[svn-commits] kmoore: trunk r331519 - in /trunk: ./ channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Aug 10 17:24:42 CDT 2011


Author: kmoore
Date: Wed Aug 10 17:24:38 2011
New Revision: 331519

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=331519
Log:
Merged revisions 331518 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r331518 | kmoore | 2011-08-10 17:23:49 -0500 (Wed, 10 Aug 2011) | 17 lines
  
  Merged revisions 331517 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r331517 | kmoore | 2011-08-10 17:23:08 -0500 (Wed, 10 Aug 2011) | 10 lines
    
    SIP Notify via AMI or CLI leaks SIP PVTs
    
    Any SIP notify sent via AMI or CLI leaks a SIP PVT with ref count +2.  Removing
    the additional ref just before the invite and adding an unref following it
    corrects the issue as seen via REF_DEBUG.  The unref existed in a distant
    revision and it appears as though the wrong ref operation was removed.
    
    (closes issue ASTERISK-18091)
    Review: https://reviewboard.asterisk.org/r/1332/
  ........
................

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-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=331519&r1=331518&r2=331519
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Aug 10 17:24:38 2011
@@ -12744,9 +12744,9 @@
 		}
 	}
 
-	dialog_ref(p, "bump the count of p, which transmit_sip_request will decrement.");
 	sip_scheddestroy(p, SIP_TRANS_TIMEOUT);
 	transmit_invite(p, SIP_NOTIFY, 0, 2, NULL);
+	dialog_unref(p, "bump down the count of p since we're done with it.");
 
 	astman_send_ack(s, m, "Notify Sent");
 	ast_variables_destroy(vars);
@@ -18966,9 +18966,9 @@
 
 		/* Recalculate our side, and recalculate Call ID */
 		ast_cli(a->fd, "Sending NOTIFY of type '%s' to '%s'\n", a->argv[2], a->argv[i]);
-		dialog_ref(p, "bump the count of p, which transmit_sip_request will decrement.");
 		sip_scheddestroy(p, SIP_TRANS_TIMEOUT);
 		transmit_invite(p, SIP_NOTIFY, 0, 2, NULL);
+		dialog_unref(p, "bump down the count of p since we're done with it.");
 	}
 
 	return CLI_SUCCESS;




More information about the svn-commits mailing list