mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Make certain ast_stopstream() sets the channel's stream members to NULL after closing them. #7067 (jcomellas)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
1
file.c
1
file.c
@@ -143,6 +143,7 @@ int ast_stopstream(struct ast_channel *tmp)
|
|||||||
/* Stop a running stream if there is one */
|
/* Stop a running stream if there is one */
|
||||||
if (tmp->stream) {
|
if (tmp->stream) {
|
||||||
ast_closestream(tmp->stream);
|
ast_closestream(tmp->stream);
|
||||||
|
tmp->stream = NULL;
|
||||||
if (tmp->oldwriteformat && ast_set_write_format(tmp, tmp->oldwriteformat))
|
if (tmp->oldwriteformat && ast_set_write_format(tmp, tmp->oldwriteformat))
|
||||||
ast_log(LOG_WARNING, "Unable to restore format back to %d\n", tmp->oldwriteformat);
|
ast_log(LOG_WARNING, "Unable to restore format back to %d\n", tmp->oldwriteformat);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user