r1765 - in trunk/varnish-cache: bin/varnishd include lib/libvcl

cecilihf at projects.linpro.no cecilihf at projects.linpro.no
Wed Jul 25 13:09:06 CEST 2007


Author: cecilihf
Date: 2007-07-25 13:09:06 +0200 (Wed, 25 Jul 2007)
New Revision: 1765

Modified:
   trunk/varnish-cache/bin/varnishd/cache.h
   trunk/varnish-cache/bin/varnishd/cache_ban.c
   trunk/varnish-cache/bin/varnishd/cache_vrt.c
   trunk/varnish-cache/include/vrt.h
   trunk/varnish-cache/lib/libvcl/vcc_action.c
   trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c
Log:
Use purge in function names instead of repurge and move VRT_purge to cache_vrt.c.


Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h	2007-07-25 11:08:24 UTC (rev 1764)
+++ trunk/varnish-cache/bin/varnishd/cache.h	2007-07-25 11:09:06 UTC (rev 1765)
@@ -360,6 +360,7 @@
 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);

Modified: trunk/varnish-cache/bin/varnishd/cache_ban.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_ban.c	2007-07-25 11:08:24 UTC (rev 1764)
+++ trunk/varnish-cache/bin/varnishd/cache_ban.c	2007-07-25 11:09:06 UTC (rev 1765)
@@ -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 unsigned ban_next;
 static struct ban *ban_start;
 
-static void
+void
 AddBan(const char *regexp)
 {
 	struct ban *b;
@@ -115,9 +114,3 @@
 
 	AddBan("a");
 }
-
-void
-VRT_repurge(const char *regexp)
-{
-	AddBan(regexp);
-}

Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vrt.c	2007-07-25 11:08:24 UTC (rev 1764)
+++ trunk/varnish-cache/bin/varnishd/cache_vrt.c	2007-07-25 11:09:06 UTC (rev 1765)
@@ -513,3 +513,12 @@
 	strcat(q, p);
 	return (q);
 }
+
+/*--------------------------------------------------------------------*/
+
+void
+VRT_purge(const char *regexp)
+{
+	
+	AddBan(regexp);
+}

Modified: trunk/varnish-cache/include/vrt.h
===================================================================
--- trunk/varnish-cache/include/vrt.h	2007-07-25 11:08:24 UTC (rev 1764)
+++ trunk/varnish-cache/include/vrt.h	2007-07-25 11:09:06 UTC (rev 1765)
@@ -70,7 +70,7 @@
 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 *);

Modified: trunk/varnish-cache/lib/libvcl/vcc_action.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_action.c	2007-07-25 11:08:24 UTC (rev 1764)
+++ trunk/varnish-cache/lib/libvcl/vcc_action.c	2007-07-25 11:09:06 UTC (rev 1765)
@@ -264,11 +264,11 @@
 /*--------------------------------------------------------------------*/
 
 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 @@
 	{ "call", 	parse_call },
 	{ "set", 	parse_set },
 	{ "remove", 	parse_remove },
-	{ "purge",	parse_repurge },
+	{ "purge",	parse_purge },
 	{ NULL,		NULL }
 };
 

Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c	2007-07-25 11:08:24 UTC (rev 1764)
+++ trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c	2007-07-25 11:09:06 UTC (rev 1765)
@@ -426,7 +426,7 @@
 	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");




More information about the varnish-commit mailing list