aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-02-28 20:50:01 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-02-28 20:50:01 +0000
commit0d3f019183c4ca71c41a26ec6f527a9ee6f7bf1f (patch)
treec65cb2731d86c96cc93665961cbed8bd1da8869c /apps/app_voicemail.c
parenta55aaaea71ec1dc9455d5dd1a078bca201ca5450 (diff)
Fix unit test that Alec Davis broke.
(closes issue #16927) Reported by: alecdavis git-svn-id: http://svn.digium.com/svn/asterisk/trunk@249491 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index f1bf4b866..275ee4455 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -2023,7 +2023,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);
@@ -5130,6 +5130,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';