Commit 7d90d625 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Move VRT_count() from sess to req

parent f80c6e35
......@@ -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);
}
/*--------------------------------------------------------------------*/
......
......@@ -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 *);
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment