Commit ccf6df17 authored by Cecilie Fritzvold's avatar Cecilie Fritzvold

Use purge in function names instead of repurge and move VRT_purge to cache_vrt.c.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1765 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 776a5212
......@@ -360,6 +360,7 @@ struct bereq *vbe_new_bereq(void);
void vbe_free_bereq(struct bereq *bereq);
/* cache_ban.c */
void AddBan(const char *);
void BAN_Init(void);
void cli_func_url_purge(struct cli *cli, char **av, void *priv);
void BAN_NewObj(struct object *o);
......
......@@ -40,7 +40,6 @@
#include "shmlog.h"
#include "cli_priv.h"
#include "cache.h"
#include "vrt.h"
struct ban {
TAILQ_ENTRY(ban) list;
......@@ -53,7 +52,7 @@ static TAILQ_HEAD(,ban) ban_head = TAILQ_HEAD_INITIALIZER(ban_head);
static unsigned ban_next;
static struct ban *ban_start;
static void
void
AddBan(const char *regexp)
{
struct ban *b;
......@@ -115,9 +114,3 @@ BAN_Init(void)
AddBan("a");
}
void
VRT_repurge(const char *regexp)
{
AddBan(regexp);
}
......@@ -513,3 +513,12 @@ VRT_IP_string(struct sess *sp, struct sockaddr *sa)
strcat(q, p);
return (q);
}
/*--------------------------------------------------------------------*/
void
VRT_purge(const char *regexp)
{
AddBan(regexp);
}
......@@ -70,7 +70,7 @@ int VRT_re_match(const char *, void *re);
int VRT_re_test(struct vsb *, const char *, int sub);
const char *VRT_regsub(struct sess *sp, const char *, void *, const char *);
void VRT_repurge(const char *);
void VRT_purge(const char *);
void VRT_count(struct sess *, unsigned);
int VRT_rewrite(const char *, const char *);
......
......@@ -264,11 +264,11 @@ parse_remove(struct tokenlist *tl)
/*--------------------------------------------------------------------*/
static void
parse_repurge(struct tokenlist *tl)
parse_purge(struct tokenlist *tl)
{
vcc_NextToken(tl);
Fb(tl, 0, "VRT_repurge(");
Fb(tl, 0, "VRT_purge(");
Expect(tl, '(');
vcc_NextToken(tl);
......@@ -299,7 +299,7 @@ static struct action_table {
{ "call", parse_call },
{ "set", parse_set },
{ "remove", parse_remove },
{ "purge", parse_repurge },
{ "purge", parse_purge },
{ NULL, NULL }
};
......
......@@ -426,7 +426,7 @@ vcl_output_lang_h(struct vsb *sb)
vsb_cat(sb, "int VRT_re_test(struct vsb *, const char *, int sub);\n");
vsb_cat(sb, "const char *VRT_regsub(struct sess *sp, const char *, void *, const char *);\n");
vsb_cat(sb, "\n");
vsb_cat(sb, "void VRT_repurge(const char *);\n");
vsb_cat(sb, "void VRT_purge(const char *);\n");
vsb_cat(sb, "\n");
vsb_cat(sb, "void VRT_count(struct sess *, unsigned);\n");
vsb_cat(sb, "int VRT_rewrite(const char *, const char *);\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