From: Joshua Colp Date: Mon, 2 Oct 2006 17:22:27 +0000 (+0000) Subject: Shrink when current_ioc is unused. It is set to -1 when unused, not 0. (issue #7941... X-Git-Tag: 1.2.13~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1f421a9f6a5e924358425421d81861d654dbf90;p=thirdparty%2Fasterisk.git Shrink when current_ioc is unused. It is set to -1 when unused, not 0. (issue #7941 reported by eclubb) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@44168 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/io.c b/io.c index c19d222c69..c54f4e3060 100644 --- a/io.c +++ b/io.c @@ -247,7 +247,7 @@ int ast_io_remove(struct io_context *ioc, int *_id) ioc->fds[x].events = 0; ioc->fds[x].revents = 0; ioc->needshrink = 1; - if (!ioc->current_ioc) + if (ioc->current_ioc == -1) io_shrink(ioc); return 0; }