[master] 7d90d62 Move VRT_count() from sess to req
Poul-Henning Kamp
phk at varnish-cache.org
Thu Jun 14 15:19:56 CEST 2012
commit 7d90d625b2191cab73c1393230582c5b8a4b9b94
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Thu Jun 14 12:33:10 2012 +0000
Move VRT_count() from sess to req
diff --git a/bin/varnishd/cache/cache_vrt.c b/bin/varnishd/cache/cache_vrt.c
index 10658cd..a7d68ad 100644
--- a/bin/varnishd/cache/cache_vrt.c
+++ b/bin/varnishd/cache/cache_vrt.c
@@ -70,15 +70,15 @@ VRT_error(const struct sess *sp, unsigned code, const char *reason)
/*--------------------------------------------------------------------*/
void
-VRT_count(const struct sess *sp, unsigned u)
+VRT_count(struct req *req, unsigned u)
{
- if (sp == NULL)
+ if (req == NULL)
return;
- CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
if (cache_param->vcl_trace)
- VSLb(sp->req->vsl, SLT_VCL_trace, "%u %u.%u", u,
- sp->req->vcl->ref[u].line, sp->req->vcl->ref[u].pos);
+ VSLb(req->vsl, SLT_VCL_trace, "%u %u.%u", u,
+ req->vcl->ref[u].line, req->vcl->ref[u].pos);
}
/*--------------------------------------------------------------------*/
diff --git a/include/vrt.h b/include/vrt.h
index bbf16ac..0b122ec 100644
--- a/include/vrt.h
+++ b/include/vrt.h
@@ -32,6 +32,7 @@
*/
struct sess;
+struct req;
struct vsb;
struct cli;
struct director;
@@ -154,7 +155,7 @@ void VRT_ban(struct sess *sp, char *, ...);
void VRT_ban_string(struct sess *sp, const char *);
void VRT_purge(const struct sess *sp, double ttl, double grace);
-void VRT_count(const struct sess *, unsigned);
+void VRT_count(struct req *, unsigned);
int VRT_rewrite(const char *, const char *);
void VRT_error(const struct sess *, unsigned, const char *);
int VRT_switch_config(const char *);
diff --git a/lib/libvcl/vcc_parse.c b/lib/libvcl/vcc_parse.c
index 1d37dd5..369aca8 100644
--- a/lib/libvcl/vcc_parse.c
+++ b/lib/libvcl/vcc_parse.c
@@ -47,7 +47,7 @@ static void vcc_Compound(struct vcc *tl);
} while (0)
#define C(tl, sep) do { \
- Fb(tl, 1, "VRT_count(sp, %u)%s\n", ++tl->cnt, sep); \
+ Fb(tl, 1, "VRT_count(req, %u)%s\n", ++tl->cnt, sep); \
tl->t->cnt = tl->cnt; \
} while (0)
More information about the varnish-commit
mailing list