]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_voicemail/app: Remove test events that were duplicated by r421059
authorMatthew Jordan <mjordan@digium.com>
Fri, 15 Aug 2014 15:41:35 +0000 (15:41 +0000)
committerMatthew Jordan <mjordan@digium.com>
Fri, 15 Aug 2014 15:41:35 +0000 (15:41 +0000)
Moving the test event raised when a file is played back (which occurred in
r421059) broke the ever loving snot out of the voicemail tests. This caused
duplicate test events to get raised, as app_voicemail and main/app were raising
events prior to call ast_streamfile. The voicemail tests did not enjoy getting
multiple events.

Since raising the playback event in ast_streamfile is far more useful to the
vast majority of tests, this patch keeps the call there and simply removes the
extraneous calls that duplicated the event.
........

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

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

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

apps/app_voicemail.c
main/app.c

index 480f8eae971029e3b3ecd0dcbecce275ecd8baba..f77856b18d9e5ae3c4995d17d4b0bb215caea8d2 100644 (file)
@@ -8036,7 +8036,6 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st
                        }
                } else {
                        /* Ask for an extension */
-                       ast_test_suite_event_notify("PLAYBACK", "Message: vm-extension");
                        res = ast_streamfile(chan, "vm-extension", ast_channel_language(chan)); /* "extension" */
                        prompt_played++;
                        if (res || prompt_played > 4)
@@ -10588,7 +10587,6 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
        adsi_begin(chan, &useadsi);
        if (!skipuser && useadsi)
                adsi_login(chan);
-       ast_test_suite_event_notify("PLAYBACK", "Message: vm-login");
        if (!silent && !skipuser && ast_streamfile(chan, "vm-login", ast_channel_language(chan))) {
                ast_log(AST_LOG_WARNING, "Couldn't stream login file\n");
                return -1;
@@ -10636,7 +10634,6 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
                        /* saved password is blank, so don't bother asking */
                        password[0] = '\0';
                } else {
-                       ast_test_suite_event_notify("PLAYBACK", "Message: %s", vm_password);
                        if (ast_streamfile(chan, vm_password, ast_channel_language(chan))) {
                                ast_log(AST_LOG_WARNING, "Unable to stream password file\n");
                                return -1;
@@ -10673,13 +10670,11 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
                logretries++;
                if (!valid) {
                        if (skipuser || logretries >= max_logins) {
-                               ast_test_suite_event_notify("PLAYBACK", "Message: vm-incorrect");
                                if (ast_streamfile(chan, "vm-incorrect", ast_channel_language(chan))) {
                                        ast_log(AST_LOG_WARNING, "Unable to stream incorrect message\n");
                                        return -1;
                                }
                        } else {
-                               ast_test_suite_event_notify("PLAYBACK", "Message: vm-incorrect-mailbox");
                                if (useadsi)
                                        adsi_login(chan);
                                if (ast_streamfile(chan, "vm-incorrect-mailbox", ast_channel_language(chan))) {
index cc9633f75afddcbf4eb6fc0471619280d4ea6e76..7cc5c65d5c7fcdb1cfafe1ca8d79fdb3a60b55df 100644 (file)
@@ -1242,7 +1242,6 @@ int ast_play_and_wait(struct ast_channel *chan, const char *fn)
 {
        int d = 0;
 
-       ast_test_suite_event_notify("PLAYBACK", "Message: %s\r\nChannel: %s", fn, ast_channel_name(chan));
        if ((d = ast_streamfile(chan, fn, ast_channel_language(chan)))) {
                return d;
        }