diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-07 00:15:51 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-07 00:15:51 +0000 |
commit | 929c72e1917ce1f14598c971a16e96df79673cc3 (patch) | |
tree | 37f7eb47d82c8b825f4fbd12d5367207eeb15060 /channel.c | |
parent | 7bf8a7b0fc2d043b2db0e64140f37ded4d4f2f34 (diff) |
Reset our stream and vstream pointers back to NULL so that any generator that uses them (file based MOH) will not try to close them again. (issue #7668 reported by jmls)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@39056 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rw-r--r-- | channel.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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; |