Commit 0290623e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Reduce strength of arguments from busyobj to boc

parent 3479b0d8
......@@ -668,7 +668,7 @@ ved_objiterate(void *priv, int flush, const void *ptr, ssize_t len)
}
static void
ved_stripgzip(struct req *req, struct busyobj *bo)
ved_stripgzip(struct req *req, struct boc *boc)
{
ssize_t l;
char *p;
......@@ -687,9 +687,9 @@ ved_stripgzip(struct req *req, struct busyobj *bo)
foo.preq = ecx->preq;
memset(foo.tailbuf, 0xdd, sizeof foo.tailbuf);
/* XXX: Is this really required ? */
if (bo != NULL)
ObjWaitState(bo->boc, BOS_FINISHED);
/* OA_GZIPBITS is not valid until BOS_FINISHED */
if (boc != NULL)
ObjWaitState(boc, BOS_FINISHED);
AN(ObjCheckFlag(req->wrk, req->objcore, OF_GZIPED));
......@@ -751,13 +751,13 @@ ved_vdp_bytes(struct req *req, enum vdp_action act, void **priv,
/*--------------------------------------------------------------------*/
static void __match_proto__(vtr_deliver_f)
VED_Deliver(struct req *req, struct busyobj *bo, int wantbody)
VED_Deliver(struct req *req, struct boc *boc, int wantbody)
{
int i;
struct ecx *ecx;
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
CHECK_OBJ_ORNULL(bo, BUSYOBJ_MAGIC);
CHECK_OBJ_ORNULL(boc, BOC_MAGIC);
CHECK_OBJ_NOTNULL(req->objcore, OBJCORE_MAGIC);
CAST_OBJ_NOTNULL(ecx, req->transport_priv, ECX_MAGIC);
......@@ -768,7 +768,7 @@ VED_Deliver(struct req *req, struct busyobj *bo, int wantbody)
req->res_mode |= RES_ESI_CHILD;
i = ObjCheckFlag(req->wrk, req->objcore, OF_GZIPED);
if (ecx->isgzip && i && !(req->res_mode & RES_ESI)) {
ved_stripgzip(req, bo);
ved_stripgzip(req, boc);
} else {
if (ecx->isgzip && !i)
VDP_push(req, ved_pretend_gzip, ecx, 1);
......
......@@ -36,7 +36,7 @@
* or may not, be talking a "real" HTTP protocol itself.
*/
typedef void vtr_deliver_f (struct req *, struct busyobj *, int sendbody);
typedef void vtr_deliver_f (struct req *, struct boc *, int sendbody);
struct transport {
unsigned magic;
......
......@@ -48,7 +48,7 @@
#include "vtim.h"
static void
cnt_vdp(struct req *req, struct busyobj *bo)
cnt_vdp(struct req *req, struct boc *boc)
{
const char *r;
uint16_t status;
......@@ -58,7 +58,7 @@ cnt_vdp(struct req *req, struct busyobj *bo)
CHECK_OBJ_NOTNULL(req->transport, TRANSPORT_MAGIC);
resp_len = http_GetContentLength(req->resp);
if (bo != NULL)
if (boc != NULL)
req->resp_len = resp_len;
else
req->resp_len = ObjGetLen(req->wrk, req->objcore);
......@@ -105,7 +105,7 @@ cnt_vdp(struct req *req, struct busyobj *bo)
"Content-Length: %jd", req->resp_len);
}
req->transport->deliver(req, bo, sendbody);
req->transport->deliver(req, boc, sendbody);
}
/*--------------------------------------------------------------------
......@@ -207,7 +207,7 @@ cnt_deliver(struct worker *wrk, struct req *req)
}
}
cnt_vdp(req, bo);
cnt_vdp(req, bo == NULL ? NULL : bo->boc);
VSLb_ts_req(req, "Resp", W_TIM_real(wrk));
......
......@@ -79,12 +79,12 @@ v1d_error(struct req *req, const char *msg)
*/
void __match_proto__(vtr_deliver_f)
V1D_Deliver(struct req *req, struct busyobj *bo, int sendbody)
V1D_Deliver(struct req *req, struct boc *boc, int sendbody)
{
int err = 0;
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
CHECK_OBJ_ORNULL(bo, BUSYOBJ_MAGIC);
CHECK_OBJ_ORNULL(boc, BOC_MAGIC);
CHECK_OBJ_NOTNULL(req->objcore, OBJCORE_MAGIC);
if (sendbody) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment