Make certain ast_stopstream() sets the channel's stream members to NULL after closin...
authorBJ Weschke <bweschke@btwtech.com>
Tue, 2 May 2006 20:06:21 +0000 (20:06 +0000)
committerBJ Weschke <bweschke@btwtech.com>
Tue, 2 May 2006 20:06:21 +0000 (20:06 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24329 65c4cc65-6c06-0410-ace0-fbb531ad65f3

file.c

diff --git a/file.c b/file.c
index 93f47be..4824d77 100644 (file)
--- a/file.c
+++ b/file.c
@@ -143,6 +143,7 @@ int ast_stopstream(struct ast_channel *tmp)
        /* Stop a running stream if there is one */
        if (tmp->stream) {
                ast_closestream(tmp->stream);
+               tmp->stream = NULL;
                if (tmp->oldwriteformat && ast_set_write_format(tmp, tmp->oldwriteformat))
                        ast_log(LOG_WARNING, "Unable to restore format back to %d\n", tmp->oldwriteformat);
        }