[asterisk-commits] dvossel: trunk r264331 - /trunk/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed May 19 14:21:08 CDT 2010
Author: dvossel
Date: Wed May 19 14:21:04 2010
New Revision: 264331
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=264331
Log:
fixes crash in check_rtp_timeout
During deadlock avoidance the sip dialog pvt is locked and
unlocked. When this occurs we have no guarantee the pvt's owner
is still valid. We were trying to access the pvt's owner after
this without checking to see if it still existed first.
(closes issue #17271)
Reported by: under
Patches:
check_rtp_timeout.diff uploaded by under (license 914)
Tested by: dvossel
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=264331&r1=264330&r2=264331
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed May 19 14:21:04 2010
@@ -23461,6 +23461,9 @@
usleep(1);
sip_pvt_lock(dialog);
}
+ if (!dialog->owner) {
+ return; /* channel hangup can occur during deadlock avoidance. */
+ }
ast_log(LOG_NOTICE, "Disconnecting call '%s' for lack of RTP activity in %ld seconds\n",
dialog->owner->name, (long) (t - dialog->lastrtprx));
/* Issue a softhangup */
More information about the asterisk-commits
mailing list