[master] aff259b Move struct vbc to cache_backend.h

Poul-Henning Kamp phk at varnish-cache.org
Wed Oct 12 13:19:48 CEST 2011


commit aff259bc2e0e19af8a0388851bc60af25511b41d
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Oct 12 11:19:37 2011 +0000

    Move struct vbc to cache_backend.h

diff --git a/bin/varnishd/cache.h b/bin/varnishd/cache.h
index 930f197..7eb3258 100644
--- a/bin/varnishd/cache.h
+++ b/bin/varnishd/cache.h
@@ -91,26 +91,27 @@ enum {
 	HTTP_HDR_FIRST,
 };
 
-struct iovec;
+struct SHA256Context;
+struct VSC_C_lck;
+struct ban;
+struct busyobj;
 struct cli;
-struct exp;
-struct vsb;
-struct sess;
+struct cli_proto;
 struct director;
+struct exp;
+struct iovec;
+struct objcore;
 struct object;
 struct objhead;
-struct objcore;
-struct busyobj;
-struct storage;
+struct pool;
+struct sess;
 struct sesspool;
+struct storage;
+struct vbc;
+struct vef_priv;
 struct vrt_backend;
-struct cli_proto;
-struct ban;
-struct SHA256Context;
-struct VSC_C_lck;
+struct vsb;
 struct waitinglist;
-struct vef_priv;
-struct pool;
 
 #define DIGEST_LEN		32
 
@@ -627,28 +628,6 @@ struct sess {
 #endif
 };
 
-/* -------------------------------------------------------------------*/
-
-/* Backend connection */
-struct vbc {
-	unsigned		magic;
-#define VBC_MAGIC		0x0c5e6592
-	VTAILQ_ENTRY(vbc)	list;
-	struct backend		*backend;
-	struct vdi_simple	*vdis;
-	unsigned		vsl_id;
-	int			fd;
-
-	struct sockaddr_storage	*addr;
-	socklen_t		addrlen;
-
-	uint8_t			recycled;
-
-	/* Timeouts */
-	double			first_byte_timeout;
-	double			between_bytes_timeout;
-};
-
 /* Prototypes etc ----------------------------------------------------*/
 
 /* cache_acceptor.c */
diff --git a/bin/varnishd/cache_backend.h b/bin/varnishd/cache_backend.h
index 21a7061..47e709d 100644
--- a/bin/varnishd/cache_backend.h
+++ b/bin/varnishd/cache_backend.h
@@ -134,6 +134,28 @@ struct backend {
 	struct VSC_C_vbe	*vsc;
 };
 
+/* -------------------------------------------------------------------*/
+
+/* Backend connection */
+struct vbc {
+	unsigned		magic;
+#define VBC_MAGIC		0x0c5e6592
+	VTAILQ_ENTRY(vbc)	list;
+	struct backend		*backend;
+	struct vdi_simple	*vdis;
+	unsigned		vsl_id;
+	int			fd;
+
+	struct sockaddr_storage	*addr;
+	socklen_t		addrlen;
+
+	uint8_t			recycled;
+
+	/* Timeouts */
+	double			first_byte_timeout;
+	double			between_bytes_timeout;
+};
+
 /* cache_backend.c */
 void VBE_ReleaseConn(struct vbc *vc);
 struct backend *vdi_get_backend_if_simple(const struct director *d);
diff --git a/bin/varnishd/cache_cli.c b/bin/varnishd/cache_cli.c
index ea4d367..01da3f2 100644
--- a/bin/varnishd/cache_cli.c
+++ b/bin/varnishd/cache_cli.c
@@ -40,6 +40,7 @@
 
 #include "cache.h"
 
+#include "cache_backend.h"		// struct vbc
 #include "hash_slinger.h"		// objhead
 #include "vcli.h"
 #include "vcli_common.h"
diff --git a/bin/varnishd/cache_fetch.c b/bin/varnishd/cache_fetch.c
index 4300780..26489b6 100644
--- a/bin/varnishd/cache_fetch.c
+++ b/bin/varnishd/cache_fetch.c
@@ -36,6 +36,7 @@
 
 #include "cache.h"
 
+#include "cache_backend.h"
 #include "vcli_priv.h"
 #include "vct.h"
 #include "vtcp.h"
diff --git a/bin/varnishd/cache_pipe.c b/bin/varnishd/cache_pipe.c
index c9bc0ac..8f109a5 100644
--- a/bin/varnishd/cache_pipe.c
+++ b/bin/varnishd/cache_pipe.c
@@ -36,6 +36,7 @@
 
 #include "cache.h"
 
+#include "cache_backend.h"
 #include "vtcp.h"
 #include "vtim.h"
 



More information about the varnish-commit mailing list