Make sure that the limit is N, not N - 1.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@240419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher 2010-01-15 20:58:19 +00:00
parent 6bc1fc7240
commit f94e723a27
1 changed files with 2 additions and 2 deletions

View File

@ -887,7 +887,7 @@ static int inprocess_count(const char *context, const char *mailbox, int delta)
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 @@ static int inprocess_count(const char *context, const char *mailbox, int delta)
ao2_link(inprocess_container, i);
ao2_unlock(inprocess_container);
ao2_ref(i, -1);
return delta;
return 0;
}
#if !(defined(ODBC_STORAGE) || defined(IMAP_STORAGE))