aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-02-28 20:51:11 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-02-28 20:51:11 +0000
commit610058b2dd9092d8f7aef65339ad910f21780989 (patch)
tree397a19b78a2d9afb952f728cbc5378194ff35c8a
parentcd2266f902e36e94cbc57449bfb4ad762e0b4b04 (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.2@249493 f38db490-d61c-443f-a65b-d21fe96a405b
-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 a52003406..1b0b89a9e 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1939,7 +1939,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);
@@ -4986,6 +4986,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';