Commit cdcaade7 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Remove unused worker arguments to VDI/close/recycle

parent a6de1269
......@@ -677,8 +677,8 @@ void VBE_UseHealth(const struct director *vdi);
struct vbc *VDI_GetFd(const struct director *, struct sess *sp);
int VDI_Healthy(const struct director *, const struct sess *sp);
void VDI_CloseFd(struct worker *wrk, struct vbc **vbp);
void VDI_RecycleFd(struct worker *wrk, struct vbc **vbp);
void VDI_CloseFd(struct vbc **vbp);
void VDI_RecycleFd(struct vbc **vbp);
void VDI_AddHostHeader(struct http *to, const struct vbc *vbc);
void VBE_Poll(void);
void VDI_Init(void);
......
......@@ -287,7 +287,7 @@ cnt_prepresp(struct sess *sp, struct worker *wrk, struct req *req)
break;
if (bo != NULL) {
AN(bo->do_stream);
VDI_CloseFd(wrk, &bo->vbc);
VDI_CloseFd(&bo->vbc);
HSH_Drop(wrk, &sp->req->obj);
VBO_DerefBusyObj(wrk, &bo);
} else {
......@@ -635,7 +635,7 @@ cnt_fetch(struct sess *sp, struct worker *wrk, struct req *req)
}
/* We are not going to fetch the body, Close the connection */
VDI_CloseFd(wrk, &bo->vbc);
VDI_CloseFd(&bo->vbc);
}
/* Clean up partial fetch */
......@@ -814,7 +814,7 @@ cnt_prepfetch(struct sess *sp, struct worker *wrk, struct req *req)
if (req->obj == NULL) {
req->err_code = 503;
sp->step = STP_ERROR;
VDI_CloseFd(wrk, &bo->vbc);
VDI_CloseFd(&bo->vbc);
VBO_DerefBusyObj(wrk, &req->busyobj);
return (0);
}
......
......@@ -40,12 +40,11 @@
/* Close a connection ------------------------------------------------*/
void
VDI_CloseFd(struct worker *wrk, struct vbc **vbp)
VDI_CloseFd(struct vbc **vbp)
{
struct backend *bp;
struct vbc *vc;
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
AN(vbp);
vc = *vbp;
*vbp = NULL;
......@@ -75,12 +74,11 @@ VDI_CloseFd(struct worker *wrk, struct vbc **vbp)
/* Recycle a connection ----------------------------------------------*/
void
VDI_RecycleFd(struct worker *wrk, struct vbc **vbp)
VDI_RecycleFd(struct vbc **vbp)
{
struct backend *bp;
struct vbc *vc;
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
AN(vbp);
vc = *vbp;
*vbp = NULL;
......
......@@ -437,7 +437,7 @@ FetchHdr(struct sess *sp, int need_host_hdr, int sendbody)
VSLb(req->vsl, SLT_FetchError,
"backend write error: %d (%s)",
errno, strerror(errno));
VDI_CloseFd(wrk, &bo->vbc);
VDI_CloseFd(&bo->vbc);
/* XXX: other cleanup ? */
return (retry);
}
......@@ -459,7 +459,7 @@ FetchHdr(struct sess *sp, int need_host_hdr, int sendbody)
VSLb(req->vsl, SLT_FetchError,
"http first read error: %d %d (%s)",
i, errno, strerror(errno));
VDI_CloseFd(wrk, &bo->vbc);
VDI_CloseFd(&bo->vbc);
/* XXX: other cleanup ? */
/* Retryable if we never received anything */
return (i == -1 ? retry : -1);
......@@ -473,7 +473,7 @@ FetchHdr(struct sess *sp, int need_host_hdr, int sendbody)
VSLb(req->vsl, SLT_FetchError,
"http first read error: %d %d (%s)",
i, errno, strerror(errno));
VDI_CloseFd(wrk, &bo->vbc);
VDI_CloseFd(&bo->vbc);
/* XXX: other cleanup ? */
return (-1);
}
......@@ -483,7 +483,7 @@ FetchHdr(struct sess *sp, int need_host_hdr, int sendbody)
if (http_DissectResponse(hp, htc)) {
VSLb(req->vsl, SLT_FetchError, "http format error");
VDI_CloseFd(wrk, &bo->vbc);
VDI_CloseFd(&bo->vbc);
/* XXX: other cleanup ? */
return (-1);
}
......@@ -585,14 +585,14 @@ FetchBody(struct worker *wrk, struct busyobj *bo, struct object *obj)
cls, mklen);
if (bo->body_status == BS_ERROR) {
VDI_CloseFd(wrk, &bo->vbc);
VDI_CloseFd(&bo->vbc);
bo->stats = NULL;
return (__LINE__);
}
if (cls < 0) {
wrk->stats.fetch_failed++;
VDI_CloseFd(wrk, &bo->vbc);
VDI_CloseFd(&bo->vbc);
obj->len = 0;
bo->stats = NULL;
return (__LINE__);
......@@ -625,9 +625,9 @@ FetchBody(struct worker *wrk, struct busyobj *bo, struct object *obj)
}
if (cls)
VDI_CloseFd(wrk, &bo->vbc);
VDI_CloseFd(&bo->vbc);
else
VDI_RecycleFd(wrk, &bo->vbc);
VDI_RecycleFd(&bo->vbc);
bo->stats = NULL;
return (0);
......
......@@ -93,7 +93,7 @@ PipeSession(struct sess *sp)
if (i) {
SES_Close(sp, "pipe");
VDI_CloseFd(sp->wrk, &vc);
VDI_CloseFd(&vc);
return;
}
......@@ -133,6 +133,6 @@ PipeSession(struct sess *sp)
}
}
SES_Close(sp, "pipe");
VDI_CloseFd(sp->wrk, &vc);
VDI_CloseFd(&vc);
bo->vbc = NULL;
}
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