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;
 }

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to