r3925 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Fri Mar 13 11:32:27 CET 2009


Author: phk
Date: 2009-03-13 11:32:27 +0100 (Fri, 13 Mar 2009)
New Revision: 3925

Modified:
   trunk/varnish-cache/bin/varnishd/cache.h
   trunk/varnish-cache/bin/varnishd/cache_ban.c
   trunk/varnish-cache/bin/varnishd/storage_persistent.c
Log:
Add a callback into persistence when we add a new ban.



Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h	2009-03-13 10:27:30 UTC (rev 3924)
+++ trunk/varnish-cache/bin/varnishd/cache.h	2009-03-13 10:32:27 UTC (rev 3925)
@@ -671,6 +671,7 @@
 void SMP_TTLchanged(const struct object *o);
 void SMP_FreeObj(struct object *o);
 void SMP_Ready(void);
+void SMP_NewBan(double t0, const char *ban);
 
 /*
  * A normal pointer difference is signed, but we never want a negative value

Modified: trunk/varnish-cache/bin/varnishd/cache_ban.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_ban.c	2009-03-13 10:27:30 UTC (rev 3924)
+++ trunk/varnish-cache/bin/varnishd/cache_ban.c	2009-03-13 10:32:27 UTC (rev 3925)
@@ -379,6 +379,7 @@
 		bi->flags |= BAN_F_GONE;
 		pcount++;
 	}
+	SMP_NewBan(b->t0, b->test);
 	Lck_Lock(&ban_mtx);
 	be->refcount--;
 	VSL_stats->n_purge_dups += pcount;

Modified: trunk/varnish-cache/bin/varnishd/storage_persistent.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/storage_persistent.c	2009-03-13 10:27:30 UTC (rev 3924)
+++ trunk/varnish-cache/bin/varnishd/storage_persistent.c	2009-03-13 10:32:27 UTC (rev 3925)
@@ -469,6 +469,17 @@
 }
 
 /*--------------------------------------------------------------------
+ * Add a new ban to all silos
+ */
+
+void
+SMP_NewBan(double t0, const char *ban)
+{
+	(void)t0;
+	(void)ban;
+}
+
+/*--------------------------------------------------------------------
  * Update objects
  */
 



More information about the varnish-commit mailing list