[svn-commits] trunk - r8591 in /trunk: ./ channel.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue Jan 24 15:38:18 MST 2006


Author: kpfleming
Date: Tue Jan 24 16:38:17 2006
New Revision: 8591

URL: http://svn.digium.com/view/asterisk?rev=8591&view=rev
Log:
Merged revisions 8588 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8588 | kpfleming | 2006-01-24 16:32:09 -0600 (Tue, 24 Jan 2006) | 2 lines

ensure that channel cannot become zombie after we check but before we try to start indications

........

Modified:
    trunk/   (props changed)
    trunk/channel.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: trunk/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/channel.c?rev=8591&r1=8590&r2=8591&view=diff
==============================================================================
--- trunk/channel.c (original)
+++ trunk/channel.c Tue Jan 24 16:38:17 2006
@@ -2050,10 +2050,12 @@
 {
 	int res = -1;
 
+	ast_mutex_lock(&chan->lock);
 	/* Stop if we're a zombie or need a soft hangup */
-	if (ast_test_flag(chan, AST_FLAG_ZOMBIE) || ast_check_hangup(chan)) 
+	if (ast_test_flag(chan, AST_FLAG_ZOMBIE) || ast_check_hangup(chan)) {
+		ast_mutex_unlock(&chan->lock);
 		return -1;
-	ast_mutex_lock(&chan->lock);
+	}
 	if (chan->tech->indicate)
 		res = chan->tech->indicate(chan, condition);
 	ast_mutex_unlock(&chan->lock);



More information about the svn-commits mailing list