From e25b9efb0f05fab50cbb65dbf1113b2b02baa2f8 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 7 Aug 2006 01:03:45 +0000 Subject: automerge commit git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@39080 f38db490-d61c-443f-a65b-d21fe96a405b --- channel.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'channel.c') diff --git a/channel.c b/channel.c index 738c6581b..26e5e05ba 100644 --- a/channel.c +++ b/channel.c @@ -1307,10 +1307,16 @@ int ast_hangup(struct ast_channel *chan) return 0; } free_translation(chan); - if (chan->stream) /* Close audio stream */ + /* Close audio stream */ + if (chan->stream) { ast_closestream(chan->stream); - if (chan->vstream) /* Close video stream */ + chan->stream = NULL; + } + /* Close video stream */ + if (chan->vstream) { ast_closestream(chan->vstream); + chan->vstream = NULL; + } if (chan->sched) { sched_context_destroy(chan->sched); chan->sched = NULL; -- cgit v1.2.3