]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
main/file: Move test event to emit PLAYBACK event more consistently
authorMatthew Jordan <mjordan@digium.com>
Thu, 14 Aug 2014 20:57:48 +0000 (20:57 +0000)
committerMatthew Jordan <mjordan@digium.com>
Thu, 14 Aug 2014 20:57:48 +0000 (20:57 +0000)
This is being done in advance of the test for ASTERISK-23953
........

Merged revisions 421059 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 421060 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@421061 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/app.c
main/file.c

index 3c2f33c51f1160cb9c304cc49c0d2d82857d39e0..cc9633f75afddcbf4eb6fc0471619280d4ea6e76 100644 (file)
@@ -256,7 +256,6 @@ enum ast_getdata_result ast_app_getdata(struct ast_channel *c, const char *promp
 
        filename = ast_strdupa(prompt);
        while ((front = strsep(&filename, "&"))) {
-               ast_test_suite_event_notify("PLAYBACK", "Message: %s\r\nChannel: %s", front, ast_channel_name(c));
                if (!ast_strlen_zero(front)) {
                        res = ast_streamfile(c, front, ast_channel_language(c));
                        if (res)
index df67fbf433a24302941088373cb4d50a3d35b30e..f4018d5373c1ec0cf8ddd47b52c03e776d4acd4b 100644 (file)
@@ -1105,6 +1105,7 @@ int ast_streamfile(struct ast_channel *chan, const char *filename, const char *p
                return -1;
        if (vfs && ast_applystream(chan, vfs))
                return -1;
+       ast_test_suite_event_notify("PLAYBACK", "Message: %s\r\nChannel: %s", filename, ast_channel_name(chan));
        res = ast_playstream(fs);
        if (!res && vfs)
                res = ast_playstream(vfs);
@@ -1611,7 +1612,6 @@ int ast_stream_and_wait(struct ast_channel *chan, const char *file, const char *
 {
        int res = 0;
        if (!ast_strlen_zero(file)) {
-               ast_test_suite_event_notify("PLAYBACK", "Message: %s\r\nChannel: %s", file, ast_channel_name(chan));
                res = ast_streamfile(chan, file, ast_channel_language(chan));
                if (!res) {
                        res = ast_waitstream(chan, digits);