diff options
author | Mark Spencer <markster@digium.com> | 2005-10-13 22:10:16 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2005-10-13 22:10:16 +0000 |
commit | 370f98e2234e1c7b84e70110491519878fc27368 (patch) | |
tree | b6f041b779afdcba1f7892cd9aee64aaf67b592e /channel.c | |
parent | c05c0c7ce6ed29905bc1a5a7c3f09ae0c9a69d82 (diff) |
Fix crash in chanspy (bug #5332)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channel.c')
-rwxr-xr-x | channel.c | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -939,22 +939,14 @@ void ast_channel_free(struct ast_channel *chan) 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; } |