[asterisk-commits] wdoekes: branch 13 r425071 - in /branches/13: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Oct 10 02:32:16 CDT 2014


Author: wdoekes
Date: Fri Oct 10 02:32:10 2014
New Revision: 425071

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=425071
Log:
chan_sip: Fix dialog leak resulting from missing ACK to re-INVITE.

If a device re-INVITEs at the same time as the dialog is hung up, and
if then the ACK to the re-INVITE never reaches Asterisk, chan_sip would
fail to destroy the dialog after a while.  This resulted in (most
prominently) file handle leaks.

(Patch reindented by me.)

ASTERISK-20784 #close
ASTERISK-15879 #close
Reported by: Torrey Searle, Nitesh Bansal
Patches:
  reinvite_ack_timeout.patch uploaded by Torrey Searle (License #5334)
  patch_asterisk_20784.txt uploaded by Nitesh Bansal (License #6418)

Reviewboard: https://reviewboard.asterisk.org/r/4052/
(testcase can be found at r4051)
........

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

Merged revisions 425069 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 425070 from http://svn.asterisk.org/svn/asterisk/branches/12

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

Propchange: branches/13/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: branches/13/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/channels/chan_sip.c?view=diff&rev=425071&r1=425070&r2=425071
==============================================================================
--- branches/13/channels/chan_sip.c (original)
+++ branches/13/channels/chan_sip.c Fri Oct 10 02:32:10 2014
@@ -4100,6 +4100,11 @@
 				append_history(pkt->owner, "DialogKill", "Killing this failed dialog immediately");
 			}
 		}
+	} else if (pkt->owner->pendinginvite == pkt->seqno) {
+	       ast_log(LOG_WARNING, "Timeout on %s on non-critical invite transaction.\n", pkt->owner->callid);
+	       pkt->owner->invitestate = INV_TERMINATED;
+	       pkt->owner->pendinginvite = 0;
+	       check_pendings(pkt->owner);
 	}
 
 	if (pkt->method == SIP_BYE) {




More information about the asterisk-commits mailing list