summaryrefslogtreecommitdiff
path: root/apps/app_mixmonitor.c
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2015-02-15 00:33:22 +0000
committerMatthew Jordan <mjordan@digium.com>2015-02-15 00:33:22 +0000
commitd1bd8b091b783c8bcefc29d87720016c94e4d5e5 (patch)
treee9eaf637a81d194ee78bb13751a483f53e11546d /apps/app_mixmonitor.c
parent455a98a2f88dbc3fb0ca7273f856e59dae969749 (diff)
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. ........ Merged revisions 431788 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 431789 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_mixmonitor.c')
-rw-r--r--apps/app_mixmonitor.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c
index a993580b3..e6f4053c0 100644
--- a/apps/app_mixmonitor.c
+++ b/apps/app_mixmonitor.c
@@ -727,12 +727,6 @@ static void *mixmonitor_thread(void *obj)
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_channel_lock(mixmonitor->autochan->chan);
@@ -760,6 +754,7 @@ static void *mixmonitor_thread(void *obj)
}
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)) {