[master] c3a4194 Concentrate director and backend related prototypes in cache_backend.h

Poul-Henning Kamp phk at FreeBSD.org
Wed Sep 24 11:07:50 CEST 2014


commit c3a41949e1956627256d488117b1099f362aeb48
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Sep 24 09:07:33 2014 +0000

    Concentrate director and backend related prototypes in cache_backend.h

diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index dd3c62a..142fcef 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -691,28 +691,6 @@ 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.c */
-void VBE_UseHealth(const struct director *vdi);
-void VBE_DiscardHealth(const struct director *vdi);
-
-/* cache_dir.c */
-int VDI_GetHdr(struct worker *wrk, struct busyobj *bo);
-struct vbc *VDI_GetFd(const struct director *d, struct worker *wrk,
-    struct busyobj *);
-int VDI_Healthy(const struct director *);
-void VDI_CloseFd(struct vbc **vbp, const struct acct_bereq *);
-void VDI_RecycleFd(struct vbc **vbp, const struct acct_bereq *);
-void VDI_AddHostHeader(struct http *to, const struct vbc *vbc);
-void VBE_Poll(void);
-void VDI_Init(void);
-
-/* cache_backend_cfg.c */
-void VBE_InitCfg(void);
-struct backend *VBE_AddBackend(struct cli *cli, const struct vrt_backend *vb);
-
-/* 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 5888180..7bec22d 100644
--- a/bin/varnishd/cache/cache_backend.h
+++ b/bin/varnishd/cache/cache_backend.h
@@ -134,12 +134,16 @@ struct vbc {
 
 /* cache_backend.c */
 void VBE_ReleaseConn(struct vbc *vc);
+void VBE_UseHealth(const struct director *vdi);
+void VBE_DiscardHealth(const struct director *vdi);
 
 /* cache_backend_cfg.c */
 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(struct cli *cli, const struct vrt_backend *vb);
 
 /* cache_backend_poll.c */
 void VBP_Insert(struct backend *b, struct vrt_backend_probe const *p,
@@ -147,3 +151,18 @@ void VBP_Insert(struct backend *b, struct vrt_backend_probe const *p,
 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_dir.c */
+int VDI_GetHdr(struct worker *wrk, struct busyobj *bo);
+struct vbc *VDI_GetFd(const struct director *d, struct worker *wrk,
+    struct busyobj *);
+int VDI_Healthy(const struct director *);
+void VDI_CloseFd(struct vbc **vbp, const struct acct_bereq *);
+void VDI_RecycleFd(struct vbc **vbp, const struct acct_bereq *);
+void VDI_AddHostHeader(struct http *to, const struct vbc *vbc);
+void VBE_Poll(void);
+void VDI_Init(void);
+
+/* cache_backend_poll.c */
+void VBP_Init(void);
+
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 5e27e76..cc581cf 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -35,6 +35,7 @@
 #include <stdlib.h>
 
 #include "cache.h"
+#include "cache_backend.h"
 #include "vend.h"
 #include "hash/hash_slinger.h"
 #include "vcl.h"
diff --git a/bin/varnishd/cache/cache_main.c b/bin/varnishd/cache/cache_main.c
index 665a024..15b8daa 100644
--- a/bin/varnishd/cache/cache_main.c
+++ b/bin/varnishd/cache/cache_main.c
@@ -33,6 +33,7 @@
 #include <stdlib.h>
 
 #include "cache.h"
+#include "cache_backend.h"
 #include "common/heritage.h"
 
 #include "vcli_priv.h"
diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c
index 521f291..c383e76 100644
--- a/bin/varnishd/cache/cache_vcl.c
+++ b/bin/varnishd/cache/cache_vcl.c
@@ -37,6 +37,7 @@
 #include <stdlib.h>
 
 #include "cache.h"
+#include "cache_backend.h"
 
 #include "vcl.h"
 #include "vrt.h"



More information about the varnish-commit mailing list