diff options
author | Mark Spencer <markster@digium.com> | 2005-03-01 04:50:52 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2005-03-01 04:50:52 +0000 |
commit | f41813c7829f1370c7dd16d4b8aff22493a780ec (patch) | |
tree | c72e972a009fa7eae8a15b2202f31a57ef11eac3 /apps/app_voicemail.c | |
parent | dc0bfa2da445f6ae5111cca382fd78914538667b (diff) |
Add some extra checks & verbosity (bug #3686)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_voicemail.c')
-rwxr-xr-x | apps/app_voicemail.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 021b59aba..8f7adb3c5 100755 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -4436,15 +4436,20 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_ logretries++; if (!valid) { if (skipuser || logretries >= maxlogins) { - if (ast_streamfile(chan, "vm-incorrect", chan->language)) - break; + if (ast_streamfile(chan, "vm-incorrect", chan->language)) { + ast_log(LOG_WARNING, "Unable to stream incorrect message\n"); + return -1; + } } else { if (useadsi) adsi_login(chan); - if (ast_streamfile(chan, "vm-incorrect-mailbox", chan->language)) - break; + if (ast_streamfile(chan, "vm-incorrect-mailbox", chan->language)) { + ast_log(LOG_WARNING, "Unable to stream incorrect mailbox message\n"); + return -1; + } } - ast_waitstream(chan, ""); + if (ast_waitstream(chan, "")) /* Channel is hung up */ + return -1; } } if (!valid && (logretries >= maxlogins)) { |