mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-20 19:07:15 -07:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@78450 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user