diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-18 14:27:21 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-18 14:27:21 +0000 |
commit | dbdb7501e3cf718e95adf781ce63463f3cf74a6e (patch) | |
tree | b0a4a553fe65e8c71a905910306c5fe3f5f0c423 /apps/app_voicemail.c | |
parent | 6dd4ef5422e2d2f8f2b27bbd10bb3ed1d4ba2631 (diff) |
Fix endless looping message by checking value of res before doing retries stuff. (issue #7140 reported by tanischen)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@28169 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r-- | apps/app_voicemail.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index f61f58e86..35eedeca6 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -6520,20 +6520,21 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s res = ast_play_and_wait(chan, "vm-star-cancel"); if (!res) res = ast_waitfordigit(chan, 6000); - if (!res) + if (!res) { retries++; - if (retries > 3) - res = 't'; - break; - + if (retries > 3) + res = 't'; } - if (res == 't') - res = 0; - else if (res == '*') - res = -1; + break; + } + if (res == 't') + res = 0; + else if (res == '*') + res = -1; } - + } + } else if (option == 1) { /* Reply */ /* Send reply directly to sender */ |