[svn-commits] tilghman: trunk r249491 - /trunk/apps/app_voicemail.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Feb 28 14:50:06 CST 2010


Author: tilghman
Date: Sun Feb 28 14:50:01 2010
New Revision: 249491

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=249491
Log:
Fix unit test that Alec Davis broke.

(closes issue #16927)
 Reported by: alecdavis

Modified:
    trunk/apps/app_voicemail.c

Modified: trunk/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=249491&r1=249490&r2=249491
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Sun Feb 28 14:50:01 2010
@@ -2023,7 +2023,7 @@
  */
 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 @@
 {
 	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';




More information about the svn-commits mailing list