r863 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Mon Aug 21 13:05:08 CEST 2006


Author: phk
Date: 2006-08-21 13:05:08 +0200 (Mon, 21 Aug 2006)
New Revision: 863

Modified:
   trunk/varnish-cache/bin/varnishd/cache_acceptor.c
   trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c
Log:
various cleanups.


Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_acceptor.c	2006-08-21 10:59:00 UTC (rev 862)
+++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c	2006-08-21 11:05:08 UTC (rev 863)
@@ -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 @@
 #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 @@
 	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();
 }

Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c	2006-08-21 10:59:00 UTC (rev 862)
+++ trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c	2006-08-21 11:05:08 UTC (rev 863)
@@ -106,7 +106,7 @@
 static void *
 vca_main(void *arg)
 {
-	unsigned u, v;
+	unsigned v;
 	struct sess *sp, *sp2;
 	struct timespec t;
 	int i;




More information about the varnish-commit mailing list