[master] 82c21f9 Rename SES_Rx*() to HTC_Rx*(), but leave them in cache_session.c for the lack of any better place to put them right now.

Poul-Henning Kamp phk at FreeBSD.org
Tue Apr 5 22:24:05 CEST 2016


commit 82c21f91d3d93bc3a68d7708549ba6109d4313eb
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Apr 5 20:17:34 2016 +0000

    Rename SES_Rx*() to HTC_Rx*(), but leave them in cache_session.c
    for the lack of any better place to put them right now.

diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index a7abad5..bb2a2b5 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -961,9 +961,9 @@ enum htc_status_e {
 	HTC_S_IDLE =		 3,
 };
 
-void SES_RxInit(struct http_conn *htc, struct ws *ws);
-void SES_RxPipeline(struct http_conn *htc, void *);
-enum htc_status_e SES_RxStuff(struct http_conn *, htc_complete_f *,
+void HTC_RxInit(struct http_conn *htc, struct ws *ws);
+void HTC_RxPipeline(struct http_conn *htc, void *);
+enum htc_status_e HTC_RxStuff(struct http_conn *, htc_complete_f *,
     double *t1, double *t2, double ti, double tn, int maxbytes);
 
 #define SESS_ATTR(UP, low, typ, len)					\
diff --git a/bin/varnishd/cache/cache_session.c b/bin/varnishd/cache/cache_session.c
index c6823d0..4eaee4b 100644
--- a/bin/varnishd/cache/cache_session.c
+++ b/bin/varnishd/cache/cache_session.c
@@ -183,7 +183,7 @@ SES_Get_String_Attr(const struct sess *sp, enum sess_attr a)
 /*--------------------------------------------------------------------*/
 
 void
-SES_RxInit(struct http_conn *htc, struct ws *ws)
+HTC_RxInit(struct http_conn *htc, struct ws *ws)
 {
 	ssize_t l;
 
@@ -204,7 +204,7 @@ SES_RxInit(struct http_conn *htc, struct ws *ws)
 }
 
 void
-SES_RxPipeline(struct http_conn *htc, void *p)
+HTC_RxPipeline(struct http_conn *htc, void *p)
 {
 
 	CHECK_OBJ_NOTNULL(htc, HTTP_CONN_MAGIC);
@@ -230,7 +230,7 @@ SES_RxPipeline(struct http_conn *htc, void *p)
  */
 
 enum htc_status_e
-SES_RxStuff(struct http_conn *htc, htc_complete_f *func,
+HTC_RxStuff(struct http_conn *htc, htc_complete_f *func,
     double *t1, double *t2, double ti, double tn, int maxbytes)
 {
 	double tmo;
diff --git a/bin/varnishd/http1/cache_http1_fetch.c b/bin/varnishd/http1/cache_http1_fetch.c
index 0c6a225..6fd5f64 100644
--- a/bin/varnishd/http1/cache_http1_fetch.c
+++ b/bin/varnishd/http1/cache_http1_fetch.c
@@ -151,12 +151,12 @@ V1F_FetchRespHdr(struct busyobj *bo)
 
 	/* Receive response */
 
-	SES_RxInit(htc, bo->ws);
+	HTC_RxInit(htc, bo->ws);
 	CHECK_OBJ_NOTNULL(htc, HTTP_CONN_MAGIC);
 	CHECK_OBJ_NOTNULL(bo->htc, HTTP_CONN_MAGIC);
 
 	t = VTIM_real() + htc->first_byte_timeout;
-	hs = SES_RxStuff(htc, HTTP1_Complete, NULL, NULL,
+	hs = HTC_RxStuff(htc, HTTP1_Complete, NULL, NULL,
 	    t, t + htc->between_bytes_timeout, cache_param->http_resp_size);
 	if (hs != HTC_S_COMPLETE) {
 		bo->acct.beresp_hdrbytes +=
diff --git a/bin/varnishd/http1/cache_http1_fsm.c b/bin/varnishd/http1/cache_http1_fsm.c
index 220dfd0..5670421 100644
--- a/bin/varnishd/http1/cache_http1_fsm.c
+++ b/bin/varnishd/http1/cache_http1_fsm.c
@@ -112,7 +112,7 @@ http1_new_session(struct worker *wrk, void *arg)
 	sp = req->sp;
 	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
 
-	SES_RxInit(req->htc, req->ws);
+	HTC_RxInit(req->htc, req->ws);
 	SES_Reserve_xport_priv(sp, &u);
 	http1_setstate(sp, H1NEWREQ);
 	wrk->task.func = http1_req;
@@ -131,7 +131,7 @@ http1_unwait(struct worker *wrk, void *arg)
 	req = Req_New(wrk, sp);
 	CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
 	req->htc->fd = sp->fd;
-	SES_RxInit(req->htc, req->ws);
+	HTC_RxInit(req->htc, req->ws);
 	http1_setstate(sp, H1NEWREQ);
 	wrk->task.func = http1_req;
 	wrk->task.priv = req;
@@ -321,7 +321,7 @@ HTTP1_Session(struct worker *wrk, struct req *req)
 			AZ(req->vcl);
 			AZ(req->esi_level);
 
-			hs = SES_RxStuff(req->htc, HTTP1_Complete,
+			hs = HTC_RxStuff(req->htc, HTTP1_Complete,
 			    &req->t_first, &req->t_req,
 			    sp->t_idle + cache_param->timeout_linger,
 			    sp->t_idle + cache_param->timeout_idle,
@@ -395,7 +395,7 @@ HTTP1_Session(struct worker *wrk, struct req *req)
 		} else if (st == H1CLEANUP) {
 			if (Req_Cleanup(sp, wrk, req))
 				return;
-			SES_RxInit(req->htc, req->ws);
+			HTC_RxInit(req->htc, req->ws);
 			if (req->htc->rxbuf_e != req->htc->rxbuf_b)
 				wrk->stats->sess_readahead++;
 			http1_setstate(sp, H1NEWREQ);
diff --git a/bin/varnishd/http1/cache_http1_proto.c b/bin/varnishd/http1/cache_http1_proto.c
index 8bac16b..30b318c 100644
--- a/bin/varnishd/http1/cache_http1_proto.c
+++ b/bin/varnishd/http1/cache_http1_proto.c
@@ -188,7 +188,7 @@ http1_dissect_hdrs(struct http *hp, char *p, struct http_conn *htc,
 	}
 	if (p < htc->rxbuf_e)
 		p += vct_skipcrlf(p);
-	SES_RxPipeline(htc, p);
+	HTC_RxPipeline(htc, p);
 	htc->rxbuf_e = p;
 	return (0);
 }
diff --git a/bin/varnishd/proxy/cache_proxy_proto.c b/bin/varnishd/proxy/cache_proxy_proto.c
index 6fb8cc4..ee6fef5 100644
--- a/bin/varnishd/proxy/cache_proxy_proto.c
+++ b/bin/varnishd/proxy/cache_proxy_proto.c
@@ -150,7 +150,7 @@ vpx_proto1(const struct worker *wrk, struct req *req)
 
 	VSL(SLT_Proxy, req->sp->vxid, "1 %s %s %s %s",
 	    fld[1], fld[3], fld[2], fld[4]);
-	SES_RxPipeline(req->htc, q);
+	HTC_RxPipeline(req->htc, q);
 	return (0);
 }
 
@@ -184,7 +184,7 @@ vpx_proto2(const struct worker *wrk, struct req *req)
 	assert(req->htc->rxbuf_e - req->htc->rxbuf_b >= 16L);
 	l = vbe16dec(req->htc->rxbuf_b + 14);
 	assert(req->htc->rxbuf_e - req->htc->rxbuf_b >= 16L + l);
-	SES_RxPipeline(req->htc, req->htc->rxbuf_b + 16L + l);
+	HTC_RxPipeline(req->htc, req->htc->rxbuf_b + 16L + l);
 	p = (const void *)req->htc->rxbuf_b;
 
 	/* Version @12 top half */
@@ -348,8 +348,8 @@ vpx_new_session(struct worker *wrk, void *arg)
 	assert(sizeof vpx1_sig == 5);
 	assert(sizeof vpx2_sig == 12);
 
-	SES_RxInit(req->htc, req->ws);
-	hs = SES_RxStuff(req->htc, vpx_complete,
+	HTC_RxInit(req->htc, req->ws);
+	hs = HTC_RxStuff(req->htc, vpx_complete,
 	    NULL, NULL, NAN, sp->t_idle + cache_param->timeout_idle,
 	    1024);			// XXX ?
 	if (hs != HTC_S_COMPLETE) {



More information about the varnish-commit mailing list