[asterisk-commits] trunk r32478 - /trunk/channel.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Jun 5 22:27:14 MST 2006


Author: russell
Date: Tue Jun  6 00:27:14 2006
New Revision: 32478

URL: http://svn.digium.com/view/asterisk?rev=32478&view=rev
Log:
fix a channel deadlock in ast_answer
(deadlock reported by and debuged with hads on #asterisk-dev on IRC)
(probably fixes issue #7267, maybe others)

Modified:
    trunk/channel.c

Modified: trunk/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/channel.c?rev=32478&r1=32477&r2=32478&view=diff
==============================================================================
--- trunk/channel.c (original)
+++ trunk/channel.c Tue Jun  6 00:27:14 2006
@@ -1502,8 +1502,10 @@
 	int res = 0;
 	ast_channel_lock(chan);
 	/* You can't answer an outbound call */
-	if (ast_test_flag(chan, AST_FLAG_OUTGOING))
+	if (ast_test_flag(chan, AST_FLAG_OUTGOING)) {
+		ast_channel_unlock(chan);
 		return 0;
+	}
 	/* Stop if we're a zombie or need a soft hangup */
 	if (ast_test_flag(chan, AST_FLAG_ZOMBIE) || ast_check_hangup(chan)) {
 		ast_channel_unlock(chan);



More information about the asterisk-commits mailing list