Mailing List Archive

[master] efca75a54 Initialize req->req_step in Req_New()
commit efca75a54b22099653a9bf6498589eb047a1836d
Author: Poul-Henning Kamp <phk@FreeBSD.org>
Date: Mon Oct 26 08:49:03 2020 +0000

Initialize req->req_step in Req_New()

diff --git a/bin/varnishd/cache/cache_esi_deliver.c b/bin/varnishd/cache/cache_esi_deliver.c
index 405aec8e2..66dbb8c22 100644
--- a/bin/varnishd/cache/cache_esi_deliver.c
+++ b/bin/varnishd/cache/cache_esi_deliver.c
@@ -181,7 +181,7 @@ ved_include(struct req *preq, const char *src, const char *host,
req->vcl = preq->vcl;
VCL_Ref(req->vcl);

- req->req_step = R_STP_TRANSPORT;
+ assert(req->req_step == R_STP_TRANSPORT);
req->t_req = preq->t_req;

req->transport = &VED_transport;
diff --git a/bin/varnishd/cache/cache_req.c b/bin/varnishd/cache/cache_req.c
index 43cb3837b..0592318b4 100644
--- a/bin/varnishd/cache/cache_req.c
+++ b/bin/varnishd/cache/cache_req.c
@@ -152,6 +152,8 @@ Req_New(const struct worker *wrk, struct sess *sp)
req->t_prev = NAN;
req->t_req = NAN;

+ req->req_step = R_STP_TRANSPORT;
+
return (req);
}

diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index c079656b1..80993232c 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -597,7 +597,7 @@ h2_end_headers(struct worker *wrk, struct h2_sess *h2,
}
AN(req->http->hd[HTTP_HDR_PROTO].b);

- req->req_step = R_STP_TRANSPORT;
+ assert(req->req_step == R_STP_TRANSPORT);
req->task->func = h2_do_req;
req->task->priv = req;
r2->scheduled = 1;
diff --git a/bin/varnishd/http2/cache_http2_session.c b/bin/varnishd/http2/cache_http2_session.c
index 4b216f85c..0637984b8 100644
--- a/bin/varnishd/http2/cache_http2_session.c
+++ b/bin/varnishd/http2/cache_http2_session.c
@@ -277,7 +277,7 @@ h2_ou_session(struct worker *wrk, struct h2_sess *h2,
/* Start req thread */
r2 = h2_new_req(wrk, h2, 1, req);
req->transport = &H2_transport;
- req->req_step = R_STP_TRANSPORT;
+ assert(req->req_step == R_STP_TRANSPORT);
req->task->func = h2_do_req;
req->task->priv = req;
r2->scheduled = 1;
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit