Mailing List Archive

r2542 - trunk/varnish-cache/bin/varnishd
Author: phk
Date: 2008-02-26 10:23:39 +0100 (Tue, 26 Feb 2008)
New Revision: 2542

Modified:
trunk/varnish-cache/bin/varnishd/cache_expire.c
Log:
Fix a bug in the hangman code: conversion from object to objexp
missed a marker variable.



Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_expire.c 2008-02-26 09:12:29 UTC (rev 2541)
+++ trunk/varnish-cache/bin/varnishd/cache_expire.c 2008-02-26 09:23:39 UTC (rev 2542)
@@ -98,6 +98,7 @@
CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC);
AZ(o->objexp);
assert(o->busy);
+ assert(o->cacheable);
o->objexp = calloc(sizeof *o->objexp, 1);
AN(o->objexp);
o->objexp->magic = OBJEXP_MAGIC;
@@ -126,6 +127,7 @@
{
struct objexp *oe;

+ CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC);
oe = o->objexp;
CHECK_OBJ_NOTNULL(oe, OBJEXP_MAGIC);

@@ -250,7 +252,7 @@
o = oe->obj;
CHECK_OBJ(o, OBJECT_MAGIC);
if (o->ttl >= t) {
- o = NULL;
+ oe = NULL;
break;
}
if (o->busy) {