r3717 - branches/2.0/varnish-cache/bin/varnishd
tfheen at projects.linpro.no
tfheen at projects.linpro.no
Tue Feb 10 15:20:30 CET 2009
Author: tfheen
Date: 2009-02-10 15:20:29 +0100 (Tue, 10 Feb 2009)
New Revision: 3717
Modified:
branches/2.0/varnish-cache/bin/varnishd/cache_center.c
branches/2.0/varnish-cache/bin/varnishd/cache_fetch.c
branches/2.0/varnish-cache/bin/varnishd/cache_http.c
branches/2.0/varnish-cache/bin/varnishd/cache_pipe.c
Log:
Merge r3530: More asserts
Be much more BOFH about bereq, more asserts, free them where they
obviously should be freed.
This could fix 421 or make it much worse, but give us more info.
Modified: branches/2.0/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_center.c 2009-02-10 14:11:16 UTC (rev 3716)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_center.c 2009-02-10 14:20:29 UTC (rev 3717)
@@ -155,6 +155,8 @@
CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);
+ AZ(sp->bereq);
+
sp->t_resp = TIM_real();
if (sp->obj->objhead != NULL) {
sp->obj->last_use = sp->t_resp; /* XXX: locking ? */
@@ -301,6 +303,7 @@
char date[40];
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ AZ(sp->bereq);
/* We always close when we take this path */
sp->doclose = "error";
@@ -663,6 +666,7 @@
sp->step = STP_FETCH;
return (0);
case VCL_RET_RESTART:
+ VBE_free_bereq(&sp->bereq);
INCOMPL();
default:
WRONG("Illegal action in vcl_miss{}");
@@ -713,6 +717,7 @@
VCL_pass_method(sp);
if (sp->handling == VCL_RET_ERROR) {
+ VBE_free_bereq(&sp->bereq);
sp->step = STP_ERROR;
return (0);
}
@@ -769,6 +774,7 @@
assert(sp->handling == VCL_RET_PIPE);
PipeSession(sp);
+ AZ(sp->bereq);
AZ(sp->wrk->wfd);
sp->step = STP_DONE;
return (0);
Modified: branches/2.0/varnish-cache/bin/varnishd/cache_fetch.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_fetch.c 2009-02-10 14:11:16 UTC (rev 3716)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_fetch.c 2009-02-10 14:20:29 UTC (rev 3717)
@@ -324,6 +324,7 @@
CHECK_OBJ_NOTNULL(sp->bereq, BEREQ_MAGIC);
AN(sp->director);
AN(sp->obj->busy);
+ AN(sp->bereq);
w = sp->wrk;
bereq = sp->bereq;
hp = bereq->http;
Modified: branches/2.0/varnish-cache/bin/varnishd/cache_http.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_http.c 2009-02-10 14:11:16 UTC (rev 3716)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_http.c 2009-02-10 14:20:29 UTC (rev 3717)
@@ -634,6 +634,7 @@
struct bereq *bereq;
struct http *hp;
+ AZ(sp->bereq);
bereq = VBE_new_bereq();
AN(bereq);
hp = bereq->http;
Modified: branches/2.0/varnish-cache/bin/varnishd/cache_pipe.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_pipe.c 2009-02-10 14:11:16 UTC (rev 3716)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_pipe.c 2009-02-10 14:20:29 UTC (rev 3717)
@@ -90,14 +90,15 @@
sp->acct_req.bodybytes +=
WRW_Write(w, sp->htc->pipeline.b, Tlen(sp->htc->pipeline));
- if (WRW_FlushRelease(w)) {
+ i = WRW_FlushRelease(w);
+ VBE_free_bereq(&bereq);
+
+ if (i) {
vca_close_session(sp, "pipe");
VBE_ClosedFd(sp);
return;
}
- VBE_free_bereq(&bereq);
-
sp->t_resp = TIM_real();
memset(fds, 0, sizeof fds);
More information about the varnish-commit
mailing list