[asterisk-commits] branch 1.2 r22112 - /branches/1.2/channel.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Apr 21 15:12:27 MST 2006


Author: tilghman
Date: Fri Apr 21 17:12:26 2006
New Revision: 22112

URL: http://svn.digium.com/view/asterisk?rev=22112&view=rev
Log:
Bug 7004 - release all threads waiting on a condition prior to freeing it

Modified:
    branches/1.2/channel.c

Modified: branches/1.2/channel.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channel.c?rev=22112&r1=22111&r2=22112&view=diff
==============================================================================
--- branches/1.2/channel.c (original)
+++ branches/1.2/channel.c Fri Apr 21 17:12:26 2006
@@ -1057,6 +1057,9 @@
 		ast_frfree(f);
 	}
 
+	/* Release all threads waiting on this trigger prior to destroying it */
+	ast_cond_broadcast(&spy->trigger);
+
 	if (ast_test_flag(spy, CHANSPY_TRIGGER_MODE) != CHANSPY_TRIGGER_NONE)
 		ast_cond_destroy(&spy->trigger);
 
@@ -1088,7 +1091,7 @@
 		if (spy->status == CHANSPY_RUNNING)
 			spy->status = CHANSPY_DONE;
 		if (ast_test_flag(spy, CHANSPY_TRIGGER_MODE) != CHANSPY_TRIGGER_NONE)
-			ast_cond_signal(&spy->trigger);
+			ast_cond_broadcast(&spy->trigger);
 		ast_mutex_unlock(&spy->lock);
 	}
 



More information about the asterisk-commits mailing list