diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-08-07 19:43:57 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-08-07 19:43:57 +0000 |
commit | 875683519a181957a96dce6893d60c49e66d5b6d (patch) | |
tree | 88d412aab93979091b5e9fc50972c0d88ef91aed /apps/app_voicemail.c | |
parent | 94428e1ef29982bfd1b20d830cc9f522b3a6aea7 (diff) |
The logic behind inboxcount's return value was reversed in has_voicemail and message_count.
(closes issue #10401, reported by st1710, patched by me)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78450 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r-- | apps/app_voicemail.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index bf2e7cdb6..d513295c4 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -2488,9 +2488,9 @@ static int has_voicemail(const char *mailbox, const char *folder) int newmsgs, oldmsgs; if(inboxcount(mailbox, &newmsgs, &oldmsgs)) - return folder? oldmsgs: newmsgs; - else return 0; + else + return folder? oldmsgs: newmsgs; } static int messagecount(const char *context, const char *mailbox, const char *folder) @@ -2503,9 +2503,9 @@ static int messagecount(const char *context, const char *mailbox, const char *fo sprintf(tmp,"%s@%s", mailbox, ast_strlen_zero(context)? "default": context); if(inboxcount(tmp, &newmsgs, &oldmsgs)) - return folder? oldmsgs: newmsgs; - else return 0; + else + return folder? oldmsgs: newmsgs; } #endif |