[asterisk-commits] app voicemail.c: Allow mailbox entry on authentication retry... (asterisk[15])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jul 26 06:55:57 CDT 2017
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/6061 )
Change subject: app_voicemail.c: Allow mailbox entry on authentication retry prompt.
......................................................................
app_voicemail.c: Allow mailbox entry on authentication retry prompt.
The following testsuite voicemail tests were failing to re-enter the
mailbox after the first login attempt.
tests/apps/voicemail/authenticate_invalid_mailbox
tests/apps/voicemail/authenticate_invalid_password
The tests were noting the start of the vm-incorrect-mailbox prompt and
immediately sending the mailbox for the next login attempt. Since the
invalid message playback had to complete before the digits were
recognized, the test passed for the wrong reason and added approximately
20 seconds to the test times.
* Allow the vm-incorrect-mailbox prompt to get interrupted by the mailbox
digits like the initial vm-login prompt so the tests are able to enter the
intended mailbox.
Change-Id: I1dc53fe917bfe03a4587b2c4cd24c94696a69df8
---
M apps/app_voicemail.c
1 file changed, 7 insertions(+), 6 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Jenkins2: Approved for Submit
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 956b951..0a07cc1 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -11064,7 +11064,7 @@
int skipuser, int max_logins, int silent)
{
int useadsi = 0, valid = 0, logretries = 0;
- char password[AST_MAX_EXTENSION]="", *passptr;
+ char password[AST_MAX_EXTENSION], *passptr;
struct ast_vm_user vmus, *vmu = NULL;
/* If ADSI is supported, setup login screen */
@@ -11106,7 +11106,8 @@
adsi_password(chan);
if (!ast_strlen_zero(prefix)) {
- char fullusername[80] = "";
+ char fullusername[80];
+
ast_copy_string(fullusername, prefix, sizeof(fullusername));
strncat(fullusername, mailbox, sizeof(fullusername) - 1 - strlen(fullusername));
ast_copy_string(mailbox, fullusername, mailbox_size);
@@ -11164,6 +11165,10 @@
free_user(vmu);
return -1;
}
+ if (ast_waitstream(chan, "")) { /* Channel is hung up */
+ free_user(vmu);
+ return -1;
+ }
} else {
if (useadsi)
adsi_login(chan);
@@ -11172,10 +11177,6 @@
free_user(vmu);
return -1;
}
- }
- if (ast_waitstream(chan, "")) { /* Channel is hung up */
- free_user(vmu);
- return -1;
}
}
}
--
To view, visit https://gerrit.asterisk.org/6061
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: I1dc53fe917bfe03a4587b2c4cd24c94696a69df8
Gerrit-Change-Number: 6061
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170726/9fe9f498/attachment-0001.html>
More information about the asterisk-commits
mailing list