diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-02-28 20:51:01 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-02-28 20:51:01 +0000 |
commit | b71ed066c45415556802b55aaccc5dca5c1d616c (patch) | |
tree | f811d474c80ec50f1dcf28f0623c6f11bb9d8380 /apps | |
parent | 2bf63fcf990ba58a6a3c40a9b70e2e3644ad1bc3 (diff) |
Merged revisions 249491 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r249491 | tilghman | 2010-02-28 14:50:01 -0600 (Sun, 28 Feb 2010) | 5 lines
Fix unit test that Alec Davis broke.
(closes issue #16927)
Reported by: alecdavis
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@249492 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_voicemail.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 3278ec790..1bf8c7700 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -1816,7 +1816,7 @@ static int __messagecount(const char *context, const char *mailbox, const char * */ static int messagecount(const char *context, const char *mailbox, const char *folder) { - if (!strcmp(folder, "INBOX")) { + if (ast_strlen_zero(folder) || !strcmp(folder, "INBOX")) { return __messagecount(context, mailbox, "INBOX") + __messagecount(context, mailbox, "Urgent"); } else { return __messagecount(context, mailbox, folder); @@ -4860,6 +4860,9 @@ static int has_voicemail(const char *mailbox, const char *folder) { char tmp[256], *tmp2 = tmp, *box, *context; ast_copy_string(tmp, mailbox, sizeof(tmp)); + if (ast_strlen_zero(folder)) { + folder = "INBOX"; + } while ((box = strsep(&tmp2, ",&"))) { if ((context = strchr(box, '@'))) *context++ = '\0'; |