From: BJ Weschke Date: Tue, 2 May 2006 20:06:21 +0000 (+0000) Subject: Make certain ast_stopstream() sets the channel's stream members to NULL after closin... X-Git-Tag: 1.4.0-beta1~1617 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=30bb866a42a58df0de033bb95a4fdd138cd1aa03;p=thirdparty%2Fasterisk.git 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 --- diff --git a/file.c b/file.c index 93f47be48d..4824d77db2 100644 --- 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); }