r3916 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Wed Mar 11 15:54:04 CET 2009


Author: phk
Date: 2009-03-11 15:54:03 +0100 (Wed, 11 Mar 2009)
New Revision: 3916

Modified:
   trunk/varnish-cache/bin/varnishd/cache_ban.c
   trunk/varnish-cache/bin/varnishd/cache_expire.c
Log:
Only call SMP functions if we have a smp pointer




Modified: trunk/varnish-cache/bin/varnishd/cache_ban.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_ban.c	2009-03-11 14:34:29 UTC (rev 3915)
+++ trunk/varnish-cache/bin/varnishd/cache_ban.c	2009-03-11 14:54:03 UTC (rev 3916)
@@ -534,7 +534,8 @@
 	} else {
 		o->ttl = 0;
 		o->ban = NULL;
-		SMP_TTLchanged(o);
+		if (o->smp != NULL)
+			SMP_TTLchanged(o);
 		/* BAN also changed, but that is not important any more */
 		WSP(sp, SLT_ExpBan, "%u was banned", o->xid);
 		EXP_Rearm(o);

Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_expire.c	2009-03-11 14:34:29 UTC (rev 3915)
+++ trunk/varnish-cache/bin/varnishd/cache_expire.c	2009-03-11 14:54:03 UTC (rev 3916)
@@ -201,7 +201,8 @@
 		assert(oc->timer_idx != BINHEAP_NOIDX);
 	}
 	Lck_Unlock(&exp_mtx);
-	SMP_TTLchanged(o);
+	if (o->smp != NULL)
+		SMP_TTLchanged(o);
 }
 
 



More information about the varnish-commit mailing list