r255 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Wed Jun 28 18:57:50 CEST 2006
Author: phk
Date: 2006-06-28 18:57:50 +0200 (Wed, 28 Jun 2006)
New Revision: 255
Modified:
trunk/varnish-cache/bin/varnishd/cache_acceptor.c
Log:
Assert that the lengths of the storage for the object add up.
Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-06-28 16:57:07 UTC (rev 254)
+++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-06-28 16:57:50 UTC (rev 255)
@@ -88,14 +88,17 @@
vca_write_obj(struct sess *sp, struct sbuf *hdr)
{
struct storage *st;
+ unsigned u = 0;
vca_write(sp, sbuf_data(hdr), sbuf_len(hdr));
TAILQ_FOREACH(st, &sp->obj->store, list) {
+ u += st->len;
if (st->stevedore->send != NULL)
st->stevedore->send(st, sp);
else
vca_write(sp, st->ptr, st->len);
}
+ assert(u == sp->obj->len);
vca_flush(sp);
}
More information about the varnish-commit
mailing list