[master] 36684de Move *_Init functions to cache.h to reduce #include pollution

Poul-Henning Kamp phk at FreeBSD.org
Wed Feb 25 15:33:31 CET 2015


commit 36684de4b4b801c47806fdd49feb72c730297b46
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Feb 25 14:33:13 2015 +0000

    Move *_Init functions to cache.h to reduce #include pollution

diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index 44c302c..fcb8c69 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -704,6 +704,12 @@ int VCA_Accept(struct listen_sock *ls, struct wrk_accept *wa);
 const char *VCA_SetupSess(struct worker *w, struct sess *sp);
 void VCA_FailSess(struct worker *w);
 
+/* cache_backend_cfg.c */
+void VBE_InitCfg(void);
+
+/* cache_backend_poll.c */
+void VBP_Init(void);
+
 /* cache_ban.c */
 struct ban *BAN_New(void);
 int BAN_AddTest(struct ban *, const char *, const char *, const char *);
diff --git a/bin/varnishd/cache/cache_backend.h b/bin/varnishd/cache/cache_backend.h
index f07cad0..4a4945a 100644
--- a/bin/varnishd/cache/cache_backend.h
+++ b/bin/varnishd/cache/cache_backend.h
@@ -108,7 +108,6 @@ void VBE_DropRefConn(struct backend *, const struct acct_bereq *);
 void VBE_DropRefVcl(struct backend *);
 void VBE_DropRefLocked(struct backend *b, const struct acct_bereq *);
 unsigned VBE_Healthy(const struct backend *b, double *changed);
-void VBE_InitCfg(void);
 struct backend *VBE_AddBackend(const struct vrt_backend *vb);
 void VBE_Poll(void);
 
@@ -119,9 +118,6 @@ void VBP_Remove(struct backend *b, struct vrt_backend_probe const *p);
 void VBP_Use(const struct backend *b, const struct vrt_backend_probe *p);
 void VBP_Summary(struct cli *cli, const struct vbp_target *vt);
 
-/* cache_backend_poll.c */
-void VBP_Init(void);
-
 struct tcp_pool *VBT_Ref(const char *name, const struct suckaddr *ip4,
     const struct suckaddr *ip6);
 void VBT_Rel(struct tcp_pool **tpp);
diff --git a/bin/varnishd/cache/cache_main.c b/bin/varnishd/cache/cache_main.c
index 3e5ebb6..b5f9b0b 100644
--- a/bin/varnishd/cache/cache_main.c
+++ b/bin/varnishd/cache/cache_main.c
@@ -33,8 +33,6 @@
 #include <stdlib.h>
 
 #include "cache.h"
-#include "cache_backend.h"
-#include "cache_director.h"
 #include "common/heritage.h"
 
 #include "vcli_priv.h"



More information about the varnish-commit mailing list