]> err.no Git - varnish/commitdiff
Make updatehealth an optional method for backends
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 20 Sep 2007 07:19:34 +0000 (07:19 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 20 Sep 2007 07:19:34 +0000 (07:19 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1961 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_backend.c
varnish-cache/bin/varnishd/cache_backend_simple.c

index de25eb10aaa5e332476adaf43fa51e227e624207..3d32ca282818dd59dda5a13dc5b5e6c0dfa30c90 100644 (file)
@@ -242,8 +242,8 @@ VBE_UpdateHealth(struct sess *sp, struct vbe_conn *vc, int a)
        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);
 }
 
index 1275ce9d32af5e82ff7d5f8be5d7b6dc0b66c56d..349cfc867c9137596708859e3e8f13e9f6b55bb0 100644 (file)
@@ -347,21 +347,6 @@ bes_GetHostname(struct backend *b)
 
 /*--------------------------------------------------------------------*/
 
-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 @@ struct backend_method backend_method_simple = {
        .close =                bes_ClosedFd,
        .recycle =              bes_RecycleFd,
        .gethostname =          bes_GetHostname,
-       .updatehealth =         bes_UpdateHealth,
        .cleanup =              bes_Cleanup,
        .init =                 bes_Init
 };