[asterisk-commits] file: trunk r42021 - /trunk/apps/app_chanspy.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Sep 5 10:01:03 MST 2006


Author: file
Date: Tue Sep  5 12:01:02 2006
New Revision: 42021

URL: http://svn.digium.com/view/asterisk?rev=42021&view=rev
Log:
Minor tweak - we need to lock the channel when we are removing the spy from it.

Modified:
    trunk/apps/app_chanspy.c

Modified: trunk/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_chanspy.c?rev=42021&r1=42020&r2=42021&view=diff
==============================================================================
--- trunk/apps/app_chanspy.c (original)
+++ trunk/apps/app_chanspy.c Tue Sep  5 12:01:02 2006
@@ -370,7 +370,9 @@
 	/* If a channel still exists on our spy structure then we need to remove ourselves */
 	if (csth.spy.chan) {
 		csth.spy.status = CHANSPY_DONE;
+		ast_channel_lock(csth.spy.chan);
 		ast_channel_spy_remove(csth.spy.chan, &csth.spy);
+		ast_channel_unlock(csth.spy.chan);
 	}
 	ast_channel_spy_free(&csth.spy);
 	



More information about the asterisk-commits mailing list