From: phk Date: Sun, 17 Sep 2006 06:45:22 +0000 (+0000) Subject: Possibly better logic. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c46da173676b1e7a535967b9b5e6ed70191fdee6;p=varnish Possibly better logic. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1043 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c b/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c index 0b54e611..0eb36af0 100644 --- a/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c +++ b/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c @@ -41,8 +41,7 @@ vca_kq_sess(struct sess *sp, int arm) return; EV_SET(&ki[nki], sp->fd, EVFILT_READ, arm, 0, 0, sp); if (++nki == NKEV) { - (void)kevent(kq, ki, nki, NULL, 0, NULL); - /* XXX: we could check the error returns here */ + assert(kevent(kq, ki, nki, NULL, 0, NULL) <= 0); nki = 0; } } @@ -84,14 +83,12 @@ vca_kev(struct kevent *kp) SES_Delete(sp); } return; - } - if (kp->flags == EV_EOF) { + } else if (kp->flags == EV_EOF) { TAILQ_REMOVE(&sesshead, sp, list); vca_close_session(sp, "EOF"); SES_Delete(sp); return; } - INCOMPL(); } /*--------------------------------------------------------------------*/