aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-13 22:10:16 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-13 22:10:16 +0000
commitc2bf316746a16aa47c20bd5a8fd945cf82de05e0 (patch)
treeb6f041b779afdcba1f7892cd9aee64aaf67b592e /channel.c
parentafa0516257e3e334083c3a87c5dc4677508e3aca (diff)
Fix crash in chanspy (bug #5332)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6768 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rwxr-xr-xchannel.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/channel.c b/channel.c
index cf972e952..3218c8d11 100755
--- a/channel.c
+++ b/channel.c
@@ -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;
}