[svn-commits] russell: trunk r317866 - in /trunk: ./ channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri May 6 14:48:11 CDT 2011


Author: russell
Date: Fri May  6 14:48:06 2011
New Revision: 317866

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

........
  r317865 | russell | 2011-05-06 14:46:49 -0500 (Fri, 06 May 2011) | 11 lines
  
  chan_sip: fix a deadlock in check_rtp_timeout.
  
  Don't block doing silly deadlock avoidance.  Just return and try again later.
  The funciton gets called often enough that it's fine.  Also, this change was
  already made in trunk.
  
  (closes issue #18791)
  Reported by: irroot
  Patches:
        chan_sip.rtptimeout.patch uploaded by irroot (license 52)
........

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

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-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=317866&r1=317865&r2=317866
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri May  6 14:48:06 2011
@@ -24933,10 +24933,11 @@
 		if (!ast_test_flag(&dialog->flags[1], SIP_PAGE2_CALL_ONHOLD) || (ast_rtp_instance_get_hold_timeout(dialog->rtp) && (t > dialog->lastrtprx + ast_rtp_instance_get_hold_timeout(dialog->rtp)))) {
 			/* Needs a hangup */
 			if (ast_rtp_instance_get_timeout(dialog->rtp)) {
-				if(ast_channel_trylock(dialog->owner)) {
-				/* Dont do a infinite deadlock avoidance loop.
-				 * Lets try this on next round (1 ms to 1000 ms later)
-				 * call is allready dead */
+				if (!dialog->owner || ast_channel_trylock(dialog->owner)) {
+					/*
+					 * Don't block, just try again later.
+					 * If there was no owner, the call is dead already.
+					 */
 					return;
 				}
 				ast_log(LOG_NOTICE, "Disconnecting call '%s' for lack of RTP activity in %ld seconds\n",




More information about the svn-commits mailing list