mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.2@39056 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
10
channel.c
10
channel.c
@@ -1307,10 +1307,16 @@ int ast_hangup(struct ast_channel *chan)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
free_translation(chan);
|
free_translation(chan);
|
||||||
if (chan->stream) /* Close audio stream */
|
/* Close audio stream */
|
||||||
|
if (chan->stream) {
|
||||||
ast_closestream(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);
|
ast_closestream(chan->vstream);
|
||||||
|
chan->vstream = NULL;
|
||||||
|
}
|
||||||
if (chan->sched) {
|
if (chan->sched) {
|
||||||
sched_context_destroy(chan->sched);
|
sched_context_destroy(chan->sched);
|
||||||
chan->sched = NULL;
|
chan->sched = NULL;
|
||||||
|
Reference in New Issue
Block a user