From: phk Date: Mon, 21 Aug 2006 11:05:08 +0000 (+0000) Subject: various cleanups. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=658e6b53bd918adc7012d6670e2963211363147e;p=varnish various cleanups. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@863 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_acceptor.c b/varnish-cache/bin/varnishd/cache_acceptor.c index 3abc20ec..ef84e85d 100644 --- a/varnish-cache/bin/varnishd/cache_acceptor.c +++ b/varnish-cache/bin/varnishd/cache_acceptor.c @@ -6,20 +6,6 @@ * write the session pointer to a pipe which the event engine monitors. */ -#undef ACCEPTOR_USE_KQUEUE -#undef ACCEPTOR_USE_EPOLL -#undef ACCEPTOR_USE_POLL - -#if defined(HAVE_KQUEUE) -#define ACCEPTOR_USE_KQUEUE 1 -#elif defined(HAVE_EPOLL_CTL) -#define ACCEPTOR_USE_EPOLL 1 -#elif defined(HAVE_POLL) -#define ACCEPTOR_USE_POLL 1 -#else -#error No usable acceptors detected. -#endif - #include #include #include @@ -47,7 +33,7 @@ static struct acceptor *vca_acceptors[] = { #if defined(HAVE_EPOLL_CTL) &acceptor_epoll, #endif -#if defined(HAVE_POLL_CTL) +#if defined(HAVE_POLL) &acceptor_poll, #endif NULL, @@ -151,5 +137,9 @@ VCA_Init(void) xids = random(); /* XXX: Add selector mechanism at some point */ + if (vca_acceptors[0]->name == NULL) { + fprintf(stderr, "No acceptor in program\n"); + exit (2); + } vca_acceptors[0]->init(); } diff --git a/varnish-cache/bin/varnishd/cache_acceptor_poll.c b/varnish-cache/bin/varnishd/cache_acceptor_poll.c index 3eebfe5c..e378ced6 100644 --- a/varnish-cache/bin/varnishd/cache_acceptor_poll.c +++ b/varnish-cache/bin/varnishd/cache_acceptor_poll.c @@ -106,7 +106,7 @@ accept_f(int fd) static void * vca_main(void *arg) { - unsigned u, v; + unsigned v; struct sess *sp, *sp2; struct timespec t; int i;