Don't double lock the stream
authorMark Spencer <markster@digium.com>
Fri, 2 Apr 2004 23:25:24 +0000 (23:25 +0000)
committerMark Spencer <markster@digium.com>
Fri, 2 Apr 2004 23:25:24 +0000 (23:25 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2605 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channel.c

index 3f6f12f..c26bb67 100755 (executable)
--- a/channel.c
+++ b/channel.c
@@ -647,8 +647,10 @@ int ast_hangup(struct ast_channel *chan)
                return 0;
        }
        free_translation(chan);
-       if (chan->stream)
-               ast_stopstream(chan);
+       if (chan->stream) 
+               ast_closestream(chan->stream);
+       if (chan->vstream)
+               ast_closestream(chan->vstream);
        if (chan->sched)
                sched_context_destroy(chan->sched);
        /* Clear any tone stuff remaining */