[asterisk-commits] tilghman: trunk r240419 - /trunk/apps/app_voicemail.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jan 15 14:58:23 CST 2010


Author: tilghman
Date: Fri Jan 15 14:58:19 2010
New Revision: 240419

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=240419
Log:
Make sure that the limit is N, not N - 1.

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=240419&r1=240418&r2=240419
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Fri Jan 15 14:58:19 2010
@@ -887,7 +887,7 @@
 		int ret = ast_atomic_fetchadd_int(&i->count, delta);
 		ao2_unlock(inprocess_container);
 		ao2_ref(i, -1);
-		return ret + delta;
+		return ret;
 	}
 	if (!(i = ao2_alloc(sizeof(*i) + strlen(context) + strlen(mailbox) + 2, NULL))) {
 		ao2_unlock(inprocess_container);
@@ -900,7 +900,7 @@
 	ao2_link(inprocess_container, i);
 	ao2_unlock(inprocess_container);
 	ao2_ref(i, -1);
-	return delta;
+	return 0;
 }
 
 #if !(defined(ODBC_STORAGE) || defined(IMAP_STORAGE))




More information about the asterisk-commits mailing list