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

Give the busyobj a copy (+ref) of the req's vcl and director.

parent 19150844
......@@ -539,6 +539,8 @@ struct busyobj {
double between_bytes_timeout;
const char *storage_hint;
struct director *director;
struct VCL_conf *vcl;
struct vsl_log vsl[1];
struct dstat *stats;
......
......@@ -141,6 +141,10 @@ VBO_GetBusyObj(struct worker *wrk, struct req *req)
bo->do_stream = 1;
bo->director = req->director;
bo->vcl = req->vcl;
VCL_Ref(bo->vcl);
return (bo);
}
......@@ -183,6 +187,8 @@ VBO_DerefBusyObj(struct worker *wrk, struct busyobj **pbo)
(void)HSH_Deref(&wrk->stats, NULL, &bo->fetch_obj);
}
VCL_Rel(&bo->vcl);
memset(&bo->refcount, 0,
sizeof *bo - offsetof(struct busyobj, refcount));
......
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