r1961 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Thu Sep 20 09:19:34 CEST 2007


Author: phk
Date: 2007-09-20 09:19:34 +0200 (Thu, 20 Sep 2007)
New Revision: 1961

Modified:
   trunk/varnish-cache/bin/varnishd/cache_backend.c
   trunk/varnish-cache/bin/varnishd/cache_backend_simple.c
Log:
Make updatehealth an optional method for backends


Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_backend.c	2007-09-20 07:14:40 UTC (rev 1960)
+++ trunk/varnish-cache/bin/varnishd/cache_backend.c	2007-09-20 07:19:34 UTC (rev 1961)
@@ -242,8 +242,8 @@
 	CHECK_OBJ_NOTNULL(vc->backend, BACKEND_MAGIC);
 	b = vc->backend;
 	AN(b->method);
-	AN(b->method->updatehealth);
-	b->method->updatehealth(sp, vc, a);
+	if(b->method->updatehealth != NULL)
+		b->method->updatehealth(sp, vc, a);
 	CHECK_OBJ_NOTNULL(b, BACKEND_MAGIC);
 }
 

Modified: trunk/varnish-cache/bin/varnishd/cache_backend_simple.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_backend_simple.c	2007-09-20 07:14:40 UTC (rev 1960)
+++ trunk/varnish-cache/bin/varnishd/cache_backend_simple.c	2007-09-20 07:19:34 UTC (rev 1961)
@@ -348,21 +348,6 @@
 /*--------------------------------------------------------------------*/
 
 static void
-bes_UpdateHealth(struct sess *sp, struct vbe_conn *vc, int a)
-{
-	(void)sp;
-	(void)vc;
-	(void)a;
-	
-	/* 
-	 * Not of any use for simple backend. The global health
-	 * parameter of the backend should be enough.
-	 */
-}
-
-/*--------------------------------------------------------------------*/
-
-static void
 bes_Init(void)
 {
 
@@ -376,7 +361,6 @@
 	.close =		bes_ClosedFd,
 	.recycle =		bes_RecycleFd,
 	.gethostname =		bes_GetHostname,
-	.updatehealth =		bes_UpdateHealth,
 	.cleanup =		bes_Cleanup,
 	.init =			bes_Init
 };




More information about the varnish-commit mailing list