Commit 4b8bf44b authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Move the ->getfd() responsibilities a few microns.

parent db649fe6
......@@ -429,6 +429,10 @@ vdi_simple_getfd(const struct director *d, struct busyobj *bo)
FIND_TMO(between_bytes_timeout,
vc->between_bytes_timeout, bo, vs->vrt);
}
if (vc != NULL)
vc->vsl = bo->vsl;
else
VSLb(bo->vsl, SLT_FetchError, "no backend connection");
return (vc);
}
......@@ -455,7 +459,7 @@ vdi_simple_gethdrs(const struct director *d, struct worker *wrk,
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
bo->vbc = VDI_GetFd(d, wrk, bo);
bo->vbc = vdi_simple_getfd(d, bo);
if (bo->vbc == NULL) {
VSLb(bo->vsl, SLT_FetchError, "no backend connection");
return (-1);
......
......@@ -127,7 +127,6 @@ VDI_Finish(const struct director *d, struct worker *wrk, struct busyobj *bo)
struct vbc *
VDI_GetFd(const struct director *d, struct worker *wrk, struct busyobj *bo)
{
struct vbc *vc;
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
......@@ -138,10 +137,7 @@ VDI_GetFd(const struct director *d, struct worker *wrk, struct busyobj *bo)
return (NULL);
AN(d->getfd);
vc = d->getfd(d, bo);
if (vc != NULL)
vc->vsl = bo->vsl;
return (vc);
return (d->getfd(d, bo));
}
/* Check health ------------------------------------------------------
......
......@@ -115,7 +115,6 @@ PipeRequest(struct req *req, struct busyobj *bo)
vc = VDI_GetFd(bo->director_req, wrk, bo);
if (vc == NULL) {
VSLb(bo->vsl, SLT_FetchError, "no backend connection");
pipecharge(req, &acct_pipe, NULL);
SES_Close(req->sp, SC_OVERLOAD);
return;
......
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