Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Commit

Permalink
Even harder asserts for kristians test
Browse files Browse the repository at this point in the history
  • Loading branch information
bsdphk authored and Tollef Fog Heen committed Aug 29, 2011
1 parent f542ba1 commit 05b386b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions bin/varnishd/cache_center.c
Expand Up @@ -164,6 +164,9 @@ cnt_prepresp(struct sess *sp)
CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC); CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC); CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);


if (sp->wrk->do_stream)
AssertObjCorePassOrBusy(sp->obj->objcore);

sp->wrk->res_mode = 0; sp->wrk->res_mode = 0;


if ((sp->wrk->h_content_length != NULL || !sp->wrk->do_stream) && if ((sp->wrk->h_content_length != NULL || !sp->wrk->do_stream) &&
Expand Down Expand Up @@ -242,10 +245,12 @@ cnt_prepresp(struct sess *sp)
default: default:
WRONG("Illegal action in vcl_deliver{}"); WRONG("Illegal action in vcl_deliver{}");
} }
if (sp->wrk->do_stream) if (sp->wrk->do_stream) {
AssertObjCorePassOrBusy(sp->obj->objcore);
sp->step = STP_STREAMBODY; sp->step = STP_STREAMBODY;
else } else {
sp->step = STP_DELIVER; sp->step = STP_DELIVER;
}
return (0); return (0);
} }


Expand Down Expand Up @@ -817,8 +822,9 @@ cnt_fetchbody(struct sess *sp)
RFC2616_Do_Cond(sp)) RFC2616_Do_Cond(sp))
sp->wrk->do_stream = 0; sp->wrk->do_stream = 0;


AssertObjCorePassOrBusy(sp->obj->objcore);

if (sp->wrk->do_stream) { if (sp->wrk->do_stream) {
AssertObjCorePassOrBusy(sp->obj->objcore);
sp->step = STP_PREPRESP; sp->step = STP_PREPRESP;
return (0); return (0);
} }
Expand Down Expand Up @@ -886,6 +892,8 @@ cnt_streambody(struct sess *sp)


RES_StreamStart(sp); RES_StreamStart(sp);


AssertObjCorePassOrBusy(sp->obj->objcore);

i = FetchBody(sp); i = FetchBody(sp);


sp->wrk->h_content_length = NULL; sp->wrk->h_content_length = NULL;
Expand Down

0 comments on commit 05b386b

Please sign in to comment.