Commit 3fa8b2de authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Assert that deadlines are not NAN



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2754 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 0d7eec76
......@@ -55,6 +55,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "shmlog.h"
#include "binary_heap.h"
......@@ -150,6 +151,7 @@ update_object_when(const struct object *o)
oe->timer_when = o->ttl + HSH_Grace(o->grace);
oe->timer_what = tmr_ttl;
}
assert(!isnan(oe->timer_when));
}
/*--------------------------------------------------------------------
......@@ -259,7 +261,7 @@ exp_timer(void *arg)
struct object *o;
double t;
struct sess *sp;
unsigned char log[1024]; /* XXX size ? */
unsigned char logbuf[1024]; /* XXX size ? */
THR_Name("cache-timeout");
(void)arg;
......@@ -268,8 +270,8 @@ exp_timer(void *arg)
XXXAN(sp);
sp->wrk = &ww;
ww.magic = WORKER_MAGIC;
ww.wlp = ww.wlb = log;
ww.wle = log + sizeof log;
ww.wlp = ww.wlb = logbuf;
ww.wle = logbuf + sizeof logbuf;
AZ(sleep(10)); /* XXX: Takes time for VCL to arrive */
VCL_Get(&sp->vcl);
......
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