[svn-commits] mmichelson: branch 1.4 r78450 - /branches/1.4/apps/app_voicemail.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Aug 7 14:43:57 CDT 2007


Author: mmichelson
Date: Tue Aug  7 14:43:57 2007
New Revision: 78450

URL: http://svn.digium.com/view/asterisk?view=rev&rev=78450
Log:
The logic behind inboxcount's return value was reversed in has_voicemail and message_count.

(closes issue #10401, reported by st1710, patched by me)


Modified:
    branches/1.4/apps/app_voicemail.c

Modified: branches/1.4/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_voicemail.c?view=diff&rev=78450&r1=78449&r2=78450
==============================================================================
--- branches/1.4/apps/app_voicemail.c (original)
+++ branches/1.4/apps/app_voicemail.c Tue Aug  7 14:43:57 2007
@@ -2488,9 +2488,9 @@
 	int newmsgs, oldmsgs;
 	
 	if(inboxcount(mailbox, &newmsgs, &oldmsgs))
+		return 0;
+	else
 		return folder? oldmsgs: newmsgs;
-	else
-		return 0;
 }
 
 static int messagecount(const char *context, const char *mailbox, const char *folder)
@@ -2503,9 +2503,9 @@
 	sprintf(tmp,"%s@%s", mailbox, ast_strlen_zero(context)? "default": context);
 
 	if(inboxcount(tmp, &newmsgs, &oldmsgs))
+		return 0;
+	else
 		return folder? oldmsgs: newmsgs;
-	else
-		return 0;
 }
 
 #endif




More information about the svn-commits mailing list