[svn-commits] mjordan: branch 11 r431788 - /branches/11/apps/app_mixmonitor.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Feb 14 18:32:03 CST 2015


Author: mjordan
Date: Sat Feb 14 18:31:55 2015
New Revision: 431788

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=431788
Log:
apps/app_mixmonitor: Move Test Event for MIXMONITOR_END to after it finishes

The Test Event for MIXMONITOR_END - which signals that a MixMonitor has
completed - technically fired before the filestream was closed. If a test
used this to trigger a condition to verify that the file was written, it
could result in a race condition where the file size would not be what the
test expected.

Luckily, no tests were using this (although they should have been). Since the
test event needed to be moved after the point where the MixMonitor autochan has
been destroyed, the test event no longer emits the channel name. Luckily,
nothing needs it.

Modified:
    branches/11/apps/app_mixmonitor.c

Modified: branches/11/apps/app_mixmonitor.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/apps/app_mixmonitor.c?view=diff&rev=431788&r1=431787&r2=431788
==============================================================================
--- branches/11/apps/app_mixmonitor.c (original)
+++ branches/11/apps/app_mixmonitor.c Sat Feb 14 18:31:55 2015
@@ -694,12 +694,6 @@
 		ast_audiohook_lock(&mixmonitor->audiohook);
 	}
 
-	/* Test Event */
-	ast_test_suite_event_notify("MIXMONITOR_END", "Channel: %s\r\n"
-									"File: %s\r\n",
-									ast_channel_name(mixmonitor->autochan->chan),
-									mixmonitor->filename);
-
 	ast_audiohook_unlock(&mixmonitor->audiohook);
 
 	ast_autochan_destroy(mixmonitor->autochan);
@@ -721,6 +715,7 @@
 	}
 
 	ast_verb(2, "End MixMonitor Recording %s\n", mixmonitor->name);
+	ast_test_suite_event_notify("MIXMONITOR_END", "File: %s\r\n", mixmonitor->filename);
 
 	if (!AST_LIST_EMPTY(&mixmonitor->recipient_list)) {
 		if (ast_strlen_zero(fs_ext)) {




More information about the svn-commits mailing list