[asterisk-commits] jrose: trunk r359905 - in /trunk: ./ apps/app_chanspy.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Mar 16 16:00:14 CDT 2012


Author: jrose
Date: Fri Mar 16 16:00:07 2012
New Revision: 359905

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=359905
Log:
Prevent chanspy from binding to zombie channels

This patch addresses a bug with chanspy on local channels which roughly 50% of the time
would create a situation where chanspy can latch onto a zombie channel, keeping the zombie
alive forever and causing the channel doing the spying to never be able to hang up.

(closes issue ASTERISK-19493)
Reported by: lvl
Review: https://reviewboard.asterisk.org/r/1819/
........

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

Merged revisions 359898 from http://svn.asterisk.org/svn/asterisk/branches/10

Modified:
    trunk/   (props changed)
    trunk/apps/app_chanspy.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Modified: trunk/apps/app_chanspy.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_chanspy.c?view=diff&rev=359905&r1=359904&r2=359905
==============================================================================
--- trunk/apps/app_chanspy.c (original)
+++ trunk/apps/app_chanspy.c Fri Mar 16 16:00:07 2012
@@ -529,7 +529,8 @@
 
 	/* We now hold the channel lock on spyee */
 
-	if (ast_check_hangup(chan) || ast_check_hangup(spyee_autochan->chan)) {
+	if (ast_check_hangup(chan) || ast_check_hangup(spyee_autochan->chan) ||
+			ast_test_flag(ast_channel_flags(spyee_autochan->chan), AST_FLAG_ZOMBIE)) {
 		return 0;
 	}
 




More information about the asterisk-commits mailing list