[master] 8fb7bf0 Run VFP open before beresp->obj copy

Poul-Henning Kamp phk at FreeBSD.org
Wed Jul 9 19:58:23 CEST 2014


commit 8fb7bf02f247b5d5d7f518e113f3b6ed2d1cbd09
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Jul 9 17:58:06 2014 +0000

    Run VFP open before beresp->obj copy

diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 22cfac6..b31e2e2 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -479,6 +479,12 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
 	if (bo->htc.body_status == BS_NONE)
 		bo->do_stream = 0;
 
+	if (VFP_Open(bo)) {
+		(void)VFP_Error(bo, "Fetch Pipeline failed to open");
+		bo->should_close = 1;
+		return (F_STP_ERROR);
+	}
+
 	if (vbf_beresp2obj(bo)) {
 		(void)VFP_Error(bo, "Could not get storage");
 		bo->should_close = 1;
@@ -508,12 +514,6 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
 
 	assert (bo->state == BOS_REQ_DONE);
 
-	if (VFP_Open(bo)) {
-		(void)VFP_Error(bo, "Fetch Pipeline failed to open");
-		bo->should_close = 1;
-		return (F_STP_ERROR);
-	}
-
 	if (bo->do_stream) {
 		HSH_Unbusy(&wrk->stats, obj->objcore);
 		VBO_setstate(bo, BOS_STREAM);



More information about the varnish-commit mailing list