Commit e7478e1c authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Assert that we have obj->entered before we calculate TTL using it.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3180 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 36cc6b64
......@@ -36,6 +36,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
#include "shmlog.h"
#include "cache.h"
......@@ -75,6 +76,7 @@ RFC2616_Ttl(const struct sess *sp, const struct http *hp, struct object *obj)
double h_date, h_expires, ttd;
char *p;
assert(obj->entered != 0.0 && !isnan(sp->obj->entered));
/* If all else fails, cache using default ttl */
ttl = params->default_ttl;
......
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