git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1962
d4fa192b-c00b-0410-8231-
f00ffab90ce4
/*--------------------------------------------------------------------*/
+static void
+VBE_AddBackendMethod(struct backend_method *bem)
+{
+
+ if (bem->init != NULL)
+ bem->init();
+}
+
+/*--------------------------------------------------------------------*/
+
void
VBE_Init(void)
{
MTX_INIT(&VBE_mtx);
- backend_method_simple.init();
- backend_method_random.init();
- backend_method_round_robin.init();
+ VBE_AddBackendMethod(&backend_method_simple);
+ VBE_AddBackendMethod(&backend_method_random);
+ VBE_AddBackendMethod(&backend_method_round_robin);
}
/*--------------------------------------------------------------------*/
-static void
-bes_Init(void)
-{
-
-}
-
-/*--------------------------------------------------------------------*/
-
struct backend_method backend_method_simple = {
.name = "simple",
.getfd = bes_GetFd,
.recycle = bes_RecycleFd,
.gethostname = bes_GetHostname,
.cleanup = bes_Cleanup,
- .init = bes_Init
};
/*--------------------------------------------------------------------*/