Commit 0bd77f2f authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Output line+pos for counts.


git-svn-id: http://www.varnish-cache.org/svn/trunk@206 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent fb8d34ab
......@@ -198,10 +198,12 @@ VCL_error(VCL_FARGS, unsigned err, const char *str)
}
void
VCL_count(unsigned u)
VCL_count(struct sess *sp, unsigned u)
{
VSL(SLT_VCL, 0, "%u", u);
VSL(SLT_VCL, 0, "%u %d.%d", u,
sp->vcl->ref[u].line,
sp->vcl->ref[u].pos);
}
/*--------------------------------------------------------------------*/
......
......@@ -91,7 +91,7 @@ struct backend {
#define VCL_FARGS struct sess *sess
#define VCL_PASS_ARGS sess
void VCL_count(unsigned);
void VCL_count(struct sess *, unsigned);
void VCL_no_cache(VCL_FARGS);
void VCL_no_new_cache(VCL_FARGS);
int ip_match(unsigned, struct vcl_acl *);
......
......@@ -272,7 +272,7 @@ _Expect(struct tokenlist *tl, unsigned tok, int line)
#define C(tl, sep) do { \
I(tl); \
sbuf_printf(tl->fc, "VCL_count(%u)%s\n", ++tl->cnt, sep); \
sbuf_printf(tl->fc, "VCL_count(sess, %u)%s\n", ++tl->cnt, sep); \
tl->t->cnt = tl->cnt; \
} while (0)
......
......@@ -490,7 +490,7 @@ vcl_output_lang_h(FILE *f)
fputs("#define VCL_FARGS struct sess *sess\n", f);
fputs("#define VCL_PASS_ARGS sess\n", f);
fputs("\n", f);
fputs("void VCL_count(unsigned);\n", f);
fputs("void VCL_count(struct sess *, unsigned);\n", f);
fputs("void VCL_no_cache(VCL_FARGS);\n", f);
fputs("void VCL_no_new_cache(VCL_FARGS);\n", f);
fputs("int ip_match(unsigned, struct vcl_acl *);\n", f);
......
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