r2066 - in trunk/varnish-cache: include lib/libvcl

phk at projects.linpro.no phk at projects.linpro.no
Sun Sep 30 22:38:16 CEST 2007


Author: phk
Date: 2007-09-30 22:38:15 +0200 (Sun, 30 Sep 2007)
New Revision: 2066

Modified:
   trunk/varnish-cache/include/vrt_obj.h
   trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c
   trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl
   trunk/varnish-cache/lib/libvcl/vcc_obj.c
Log:
Add req.restarts variable.


Modified: trunk/varnish-cache/include/vrt_obj.h
===================================================================
--- trunk/varnish-cache/include/vrt_obj.h	2007-09-30 20:36:16 UTC (rev 2065)
+++ trunk/varnish-cache/include/vrt_obj.h	2007-09-30 20:38:15 UTC (rev 2066)
@@ -21,6 +21,7 @@
 void VRT_l_req_hash(struct sess *, const char *);
 struct backend * VRT_r_req_backend(struct sess *);
 void VRT_l_req_backend(struct sess *, struct backend *);
+int VRT_r_req_restarts(const struct sess *);
 const char * VRT_r_bereq_request(const struct sess *);
 void VRT_l_bereq_request(const struct sess *, const char *, ...);
 const char * VRT_r_bereq_url(const struct sess *);

Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c	2007-09-30 20:36:16 UTC (rev 2065)
+++ trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c	2007-09-30 20:38:15 UTC (rev 2066)
@@ -530,6 +530,7 @@
 	vsb_cat(sb, "void VRT_l_req_hash(struct sess *, const char *);\n");
 	vsb_cat(sb, "struct backend * VRT_r_req_backend(struct sess *);\n");
 	vsb_cat(sb, "void VRT_l_req_backend(struct sess *, struct backend *);\n");
+	vsb_cat(sb, "int VRT_r_req_restarts(const struct sess *);\n");
 	vsb_cat(sb, "const char * VRT_r_bereq_request(const struct sess *);\n");
 	vsb_cat(sb, "void VRT_l_bereq_request(const struct sess *, const char *, ...);\n");
 	vsb_cat(sb, "const char * VRT_r_bereq_url(const struct sess *);\n");

Modified: trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl	2007-09-30 20:36:16 UTC (rev 2065)
+++ trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl	2007-09-30 20:38:15 UTC (rev 2066)
@@ -92,6 +92,11 @@
 		{recv pipe pass hash miss hit fetch                        }
 		"struct sess *"
 	}
+	{ req.restarts
+		RO INT
+		{recv pipe pass hash miss hit fetch deliver                }
+		"const struct sess *"
+	}
 
 	# Request sent to backend
 	{ bereq.request

Modified: trunk/varnish-cache/lib/libvcl/vcc_obj.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_obj.c	2007-09-30 20:36:16 UTC (rev 2065)
+++ trunk/varnish-cache/lib/libvcl/vcc_obj.c	2007-09-30 20:38:15 UTC (rev 2066)
@@ -98,6 +98,13 @@
 	    0,
 	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH
 	},
+	{ "req.restarts", INT, 12,
+	    "VRT_r_req_restarts(sp)",
+	    NULL,
+	    V_RO,
+	    0,
+	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
+	},
 	{ "bereq.request", STRING, 13,
 	    "VRT_r_bereq_request(sp)",
 	    "VRT_l_bereq_request(sp, ",




More information about the varnish-commit mailing list