Commit 2acf07e9 authored by Tollef Fog Heen's avatar Tollef Fog Heen

Revert commit 3163, fix in VRT_purge instead.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3167 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent a7ed1d77
......@@ -710,7 +710,8 @@ void
VRT_purge(const char *regexp, int hash)
{
(void)BAN_Add(NULL, regexp, hash);
if (regexp != NULL)
(void)BAN_Add(NULL, regexp, hash);
}
/*--------------------------------------------------------------------
......
......@@ -336,26 +336,22 @@ parse_unset(struct tokenlist *tl)
static void
parse_purge_url(struct tokenlist *tl)
{
struct var *vp;
vcc_NextToken(tl);
Fb(tl, 1, "VRT_purge(");
Expect(tl, '(');
vcc_NextToken(tl);
vp = vcc_FindVar(tl, tl->t, vcc_vars);
ERRCHK(tl);
assert(vp != NULL);
if (vp->fmt != STRING) {
if (!vcc_StringVal(tl)) {
vcc_ExpectedStringval(tl);
return;
}
Fb(tl, 1, "if (%s) VRT_purge(%s, 0);\n", vp->rname, vp->rname);
vcc_NextToken(tl);
Expect(tl, ')');
vcc_NextToken(tl);
Fb(tl, 0, ", 0);\n");
}
......
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