[master] f1fafd2 Add the objcore to the vfp_ctx
Poul-Henning Kamp
phk at FreeBSD.org
Tue Aug 19 10:19:45 CEST 2014
commit f1fafd28239b93ca53350b7b5f3b8f3b89b7a5b5
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Aug 19 08:10:42 2014 +0000
Add the objcore to the vfp_ctx
diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index 854cf8b..8fb679f 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -455,6 +455,7 @@ struct vfp_ctx {
unsigned magic;
#define VFP_CTX_MAGIC 0x61d9d3e5
struct busyobj *bo;
+ struct objcore *oc;
struct dstat *stats;
int failed;
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index f389304..2ad6a48 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -364,6 +364,7 @@ vbf_stp_startfetch(struct worker *wrk, struct busyobj *bo)
VFP_Setup(bo->vfc);
bo->vfc->bo = bo;
+ bo->vfc->oc = bo->fetch_objcore;
bo->vfc->stats = bo->stats;
bo->vfc->http = bo->beresp;
bo->vfc->vsl = bo->vsl;
@@ -685,6 +686,7 @@ vbf_stp_error(struct worker *wrk, struct busyobj *bo)
VFP_Setup(bo->vfc);
bo->vfc->bo = bo;
+ bo->vfc->oc = bo->fetch_objcore;
bo->vfc->stats = bo->stats;
bo->vfc->http = bo->beresp;
bo->vfc->vsl = bo->vsl;
diff --git a/bin/varnishd/cache/cache_obj.c b/bin/varnishd/cache/cache_obj.c
index b9984d7..04fd764 100644
--- a/bin/varnishd/cache/cache_obj.c
+++ b/bin/varnishd/cache/cache_obj.c
@@ -297,9 +297,8 @@ ObjSetattr(const struct vfp_ctx *vc, enum obj_attr attr, ssize_t len,
void *retval = NULL;
CHECK_OBJ_NOTNULL(vc, VFP_CTX_MAGIC);
- CHECK_OBJ_NOTNULL(vc->bo, BUSYOBJ_MAGIC);
- CHECK_OBJ_NOTNULL(vc->bo->fetch_objcore, OBJCORE_MAGIC);
- o = obj_getobj(vc->bo->fetch_objcore, vc->stats);
+ CHECK_OBJ_NOTNULL(vc->oc, OBJCORE_MAGIC);
+ o = obj_getobj(vc->oc, vc->stats);
CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC);
switch (attr) {
case OA_ESIDATA:
More information about the varnish-commit
mailing list