dect
/
asterisk
Archived
13
0
Fork 0

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

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@240419 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
tilghman 2010-01-15 20:58:19 +00:00
parent e64f0758f4
commit 345626e641
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))