]> err.no Git - varnish/commitdiff
various cleanups.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 21 Aug 2006 11:05:08 +0000 (11:05 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 21 Aug 2006 11:05:08 +0000 (11:05 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@863 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_acceptor.c
varnish-cache/bin/varnishd/cache_acceptor_poll.c

index 3abc20ecb3eb656a9b22838be0ffd12fe1a62f03..ef84e85ddf6cbb0e837bd07f793f91572f1641d7 100644 (file)
@@ -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 <stdio.h>
 #include <errno.h>
 #include <string.h>
@@ -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();
 }
index 3eebfe5ce41d8576f8389893fd86bd5e179a9ca2..e378ced61576b8963d690bad82e830e3b2ad20da 100644 (file)
@@ -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;