[svn-commits] branch 1.2 r24295 - /branches/1.2/file.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue May 2 12:39:50 MST 2006


Author: bweschke
Date: Tue May  2 14:39:50 2006
New Revision: 24295

URL: http://svn.digium.com/view/asterisk?rev=24295&view=rev
Log:
 Make certain ast_stopstream() sets the channel's stream members to NULL after closing them. #7067 (jcomellas)


Modified:
    branches/1.2/file.c

Modified: branches/1.2/file.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/file.c?rev=24295&r1=24294&r2=24295&view=diff
==============================================================================
--- branches/1.2/file.c (original)
+++ branches/1.2/file.c Tue May  2 14:39:50 2006
@@ -184,10 +184,13 @@
 int ast_stopstream(struct ast_channel *tmp)
 {
 	/* Stop a running stream if there is one */
-	if (tmp->vstream)
+	if (tmp->vstream) {
 		ast_closestream(tmp->vstream);
+		tmp->vstream = NULL;
+	}
 	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);
 	}



More information about the svn-commits mailing list