From 9679c28cc132bfa56f5812d1363737c9953abdc2 Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 20 Jun 2008 21:16:22 +0000 Subject: [PATCH] Rename AddBan() to BAN_Add() for consistency. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2750 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache.h | 2 +- varnish-cache/bin/varnishd/cache_ban.c | 9 +++++---- varnish-cache/bin/varnishd/cache_vrt.c | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache.h b/varnish-cache/bin/varnishd/cache.h index 622f18d5..fcb12dc7 100644 --- a/varnish-cache/bin/varnishd/cache.h +++ b/varnish-cache/bin/varnishd/cache.h @@ -426,7 +426,7 @@ void VBE_AddHostHeader(struct sess *sp); void VBE_SelectBackend(struct sess *sp); /* cache_ban.c */ -void AddBan(const char *, int hash); +void BAN_Add(const char *, int hash); void BAN_Init(void); void BAN_NewObj(struct object *o); void BAN_DestroyObj(struct object *o); diff --git a/varnish-cache/bin/varnishd/cache_ban.c b/varnish-cache/bin/varnishd/cache_ban.c index 9536af18..05cf412a 100644 --- a/varnish-cache/bin/varnishd/cache_ban.c +++ b/varnish-cache/bin/varnishd/cache_ban.c @@ -66,7 +66,7 @@ static MTX ban_mtx; static struct ban * volatile ban_start; void -AddBan(const char *regexp, int hash) +BAN_Add(const char *regexp, int hash) { struct ban *b; int i; @@ -179,7 +179,7 @@ ccf_purge_url(struct cli *cli, const char * const *av, void *priv) { (void)priv; - AddBan(av[2], 0); + BAN_Add(av[2], 0); cli_out(cli, "URL_PURGE %s\n", av[2]); } @@ -188,7 +188,7 @@ ccf_purge_hash(struct cli *cli, const char * const *av, void *priv) { (void)priv; - AddBan(av[2], 1); + BAN_Add(av[2], 1); cli_out(cli, "HASH_PURGE %s\n", av[2]); } @@ -235,5 +235,6 @@ BAN_Init(void) MTX_INIT(&ban_mtx); CLI_AddFuncs(PUBLIC_CLI, ban_cmds); - AddBan("^\001$", 0); + /* Add an initial ban, since the list can never be empty */ + BAN_Add(".", 0); } diff --git a/varnish-cache/bin/varnishd/cache_vrt.c b/varnish-cache/bin/varnishd/cache_vrt.c index d0f76d96..bf2f21f5 100644 --- a/varnish-cache/bin/varnishd/cache_vrt.c +++ b/varnish-cache/bin/varnishd/cache_vrt.c @@ -638,7 +638,7 @@ void VRT_purge(const char *regexp, int hash) { - AddBan(regexp, hash); + BAN_Add(regexp, hash); } /*-------------------------------------------------------------------- -- 2.39.5