[master] 255a789da Rename REQ_BODY_WITH_LEN to REQ_BODY_LENGTH in preparation for merge with BS_*

Poul-Henning Kamp phk at FreeBSD.org
Fri Feb 21 08:34:07 UTC 2020


commit 255a789da1d53544703cb79193d4614031497087
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Fri Feb 21 07:17:46 2020 +0000

    Rename REQ_BODY_WITH_LEN to REQ_BODY_LENGTH in preparation for merge with BS_*

diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index df00367e0..0ac2b8338 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -249,7 +249,7 @@ vbf_stp_mkbereq(struct worker *wrk, struct busyobj *bo)
 		HSH_Ref(bo->bereq_body);
 		bo->req = NULL;
 		ObjSetState(bo->wrk, bo->fetch_objcore, BOS_REQ_DONE);
-	} else if (bo->req->req_body_status != REQ_BODY_WITH_LEN &&
+	} else if (bo->req->req_body_status != REQ_BODY_LENGTH &&
 	    bo->req->req_body_status != REQ_BODY_WITHOUT_LEN) {
 		WRONG("Bad req_body_status");
 	}
diff --git a/bin/varnishd/cache/cache_req_body.c b/bin/varnishd/cache/cache_req_body.c
index 4e12d8e06..08db8fdb6 100644
--- a/bin/varnishd/cache/cache_req_body.c
+++ b/bin/varnishd/cache/cache_req_body.c
@@ -197,7 +197,7 @@ VRB_Iterate(struct worker *wrk, struct vsl_log *vsl,
 		return (0);
 	case REQ_BODY_NONE:
 		return (0);
-	case REQ_BODY_WITH_LEN:
+	case REQ_BODY_LENGTH:
 	case REQ_BODY_WITHOUT_LEN:
 		break;
 	case REQ_BODY_TAKEN:
@@ -212,7 +212,7 @@ VRB_Iterate(struct worker *wrk, struct vsl_log *vsl,
 		WRONG("Wrong req_body_status in VRB_Iterate()");
 	}
 	Lck_Lock(&req->sp->mtx);
-	if (req->req_body_status == REQ_BODY_WITH_LEN ||
+	if (req->req_body_status == REQ_BODY_LENGTH ||
 	    req->req_body_status == REQ_BODY_WITHOUT_LEN) {
 		req->req_body_status = REQ_BODY_TAKEN;
 		i = 0;
@@ -254,7 +254,7 @@ VRB_Ignore(struct req *req)
 
 	if (req->doclose)
 		return (0);
-	if (req->req_body_status == REQ_BODY_WITH_LEN ||
+	if (req->req_body_status == REQ_BODY_LENGTH ||
 	    req->req_body_status == REQ_BODY_WITHOUT_LEN)
 		(void)VRB_Iterate(req->wrk, req->vsl, req, httpq_req_body_discard, NULL);
 	return (0);
@@ -312,7 +312,7 @@ VRB_Cache(struct req *req, ssize_t maxsize)
 	case REQ_BODY_NONE:
 		return (0);
 	case REQ_BODY_WITHOUT_LEN:
-	case REQ_BODY_WITH_LEN:
+	case REQ_BODY_LENGTH:
 		break;
 	default:
 		WRONG("Wrong req_body_status in VRB_Cache()");
diff --git a/bin/varnishd/http1/cache_http1_fsm.c b/bin/varnishd/http1/cache_http1_fsm.c
index 73ea12ce0..6332aca96 100644
--- a/bin/varnishd/http1/cache_http1_fsm.c
+++ b/bin/varnishd/http1/cache_http1_fsm.c
@@ -278,7 +278,7 @@ http1_dissect(struct worker *wrk, struct req *req)
 	if (req->htc->body_status == BS_CHUNKED)
 		req->req_body_status = REQ_BODY_WITHOUT_LEN;
 	else if (req->htc->body_status == BS_LENGTH)
-		req->req_body_status = REQ_BODY_WITH_LEN;
+		req->req_body_status = REQ_BODY_LENGTH;
 	else if (req->htc->body_status == BS_NONE)
 		req->req_body_status = REQ_BODY_NONE;
 	else if (req->htc->body_status == BS_EOF)
diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index e90dfa87f..183a327cf 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -583,7 +583,7 @@ h2_end_headers(struct worker *wrk, struct h2_sess *h2,
 		if (!http_GetHdr(req->http, H_Content_Length, NULL))
 			req->req_body_status = REQ_BODY_WITHOUT_LEN;
 		else
-			req->req_body_status = REQ_BODY_WITH_LEN;
+			req->req_body_status = REQ_BODY_LENGTH;
 	} else {
 		assert (req->req_body_status == REQ_BODY_NONE);
 		if (http_GetContentLength(req->http) > 0)
diff --git a/include/tbl/req_body.h b/include/tbl/req_body.h
index 93c46c0bc..6386f4e82 100644
--- a/include/tbl/req_body.h
+++ b/include/tbl/req_body.h
@@ -33,7 +33,7 @@
 
 REQ_BODY(INIT)
 REQ_BODY(WITHOUT_LEN)
-REQ_BODY(WITH_LEN)
+REQ_BODY(LENGTH)
 /* states >= TAKEN imply that no body is to be read */
 REQ_BODY(TAKEN)
 REQ_BODY(CACHED)


More information about the varnish-commit mailing list