[Asterisk-cvs] asterisk channel.c,1.245,1.246

markster markster
Thu Oct 13 18:15:39 CDT 2005


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv22461

Modified Files:
	channel.c 
Log Message:
Fix crash in chanspy (bug #5332)


Index: channel.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channel.c,v
retrieving revision 1.245
retrieving revision 1.246
diff -u -d -r1.245 -r1.246
--- channel.c	13 Oct 2005 18:27:53 -0000	1.245
+++ channel.c	13 Oct 2005 22:10:16 -0000	1.246
@@ -939,22 +939,14 @@
 static void ast_spy_detach(struct ast_channel *chan) 
 {
 	struct ast_channel_spy *chanspy;
-	int to=3000;
-	int sleepms = 100;
 
+	/* Marking the spies as done is sufficient.  Chanspy or spy users will get the picture. */
 	for (chanspy = chan->spiers; chanspy; chanspy = chanspy->next) {
 		if (chanspy->status == CHANSPY_RUNNING) {
 			chanspy->status = CHANSPY_DONE;
 		}
 	}
 
-	/* signal all the spys to get lost and allow them time to unhook themselves 
-	   god help us if they don't......
-	*/
-	while (chan->spiers && to >= 0) {
-		ast_safe_sleep(chan, sleepms);
-		to -= sleepms;
-	}
 	chan->spiers = NULL;
 	return;
 }




More information about the svn-commits mailing list