[master] d89bbe7 Fix an assert to test that the object has "useful lifetime" which is not the same as a positive TTL any more.
Poul-Henning Kamp
phk at FreeBSD.org
Tue Dec 17 11:19:19 CET 2013
commit d89bbe7f3123d856751d2d88a945d1401e26de36
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Dec 17 10:17:10 2013 +0000
Fix an assert to test that the object has "useful lifetime" which
is not the same as a positive TTL any more.
diff --git a/bin/varnishd/storage/storage_persistent.c b/bin/varnishd/storage/storage_persistent.c
index 487a77e..d7506f0 100644
--- a/bin/varnishd/storage/storage_persistent.c
+++ b/bin/varnishd/storage/storage_persistent.c
@@ -521,7 +521,7 @@ smp_allocobj(struct stevedore *stv, struct busyobj *bo,
if (bo->fetch_objcore == NULL)
return (NULL); /* from cnt_error */
CAST_OBJ_NOTNULL(sc, stv->priv, SMP_SC_MAGIC);
- AN(bo->exp.ttl > 0.);
+ AN((bo->exp.ttl + bo->exp.grace + bo->exp.keep) > 0.);
ltot = IRNUP(sc, ltot);
More information about the varnish-commit
mailing list