r528 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Thu Jul 20 16:40:54 CEST 2006


Author: phk
Date: 2006-07-20 16:40:54 +0200 (Thu, 20 Jul 2006)
New Revision: 528

Modified:
   trunk/varnish-cache/bin/varnishd/cache_fetch.c
   trunk/varnish-cache/bin/varnishd/cache_response.c
Log:
More asserts


Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_fetch.c	2006-07-20 14:23:59 UTC (rev 527)
+++ trunk/varnish-cache/bin/varnishd/cache_fetch.c	2006-07-20 14:40:54 UTC (rev 528)
@@ -41,6 +41,7 @@
 	cl = strtoumax(b, NULL, 0);
 
 	st = stevedore->alloc(stevedore, cl);
+	assert(st->stevedore != NULL);
 	TAILQ_INSERT_TAIL(&sp->obj->store, st, list);
 	st->len = cl;
 	sp->obj->len = cl;
@@ -105,6 +106,7 @@
 			} else {
 				st = stevedore->alloc(stevedore,
 				    stevedore->trim == NULL ? u : CHUNK_PREALLOC);
+				assert(st->stevedore != NULL);
 				TAILQ_INSERT_TAIL(&sp->obj->store, st, list);
 				p = st->ptr;
 			}
@@ -177,6 +179,7 @@
 	while (1) {
 		if (v == 0) {
 			st = stevedore->alloc(stevedore, CHUNK_PREALLOC);
+			assert(st->stevedore != NULL);
 			TAILQ_INSERT_TAIL(&sp->obj->store, st, list);
 			p = st->ptr + st->len;
 			v = st->space - st->len;

Modified: trunk/varnish-cache/bin/varnishd/cache_response.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_response.c	2006-07-20 14:23:59 UTC (rev 527)
+++ trunk/varnish-cache/bin/varnishd/cache_response.c	2006-07-20 14:40:54 UTC (rev 528)
@@ -196,6 +196,7 @@
 	/* XXX: conditional request handling */
 	if (!strcmp(sp->http->req, "GET")) {
 		TAILQ_FOREACH(st, &sp->obj->store, list) {
+			assert(st->stevedore != NULL);
 			u += st->len;
 			if (st->stevedore->send == NULL) {
 				RES_Write(sp, st->ptr, st->len);




More information about the varnish-commit mailing list