r2754 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Sat Jun 21 10:39:15 CEST 2008
Author: phk
Date: 2008-06-21 10:39:14 +0200 (Sat, 21 Jun 2008)
New Revision: 2754
Modified:
trunk/varnish-cache/bin/varnishd/cache_expire.c
Log:
Assert that deadlines are not NAN
Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_expire.c 2008-06-21 07:48:02 UTC (rev 2753)
+++ trunk/varnish-cache/bin/varnishd/cache_expire.c 2008-06-21 08:39:14 UTC (rev 2754)
@@ -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 @@
oe->timer_when = o->ttl + HSH_Grace(o->grace);
oe->timer_what = tmr_ttl;
}
+ assert(!isnan(oe->timer_when));
}
/*--------------------------------------------------------------------
@@ -259,7 +261,7 @@
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 @@
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);
More information about the varnish-commit
mailing list