[master] a8449faff esi: Harmonize VEC_* constants

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Feb 21 10:23:05 UTC 2022


commit a8449faff23a3c29d19781998fa5f2ee7ce110af
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Mon Feb 21 08:13:40 2022 +0100

    esi: Harmonize VEC_* constants

diff --git a/bin/varnishd/cache/cache_esi.h b/bin/varnishd/cache/cache_esi.h
index 58eb85ed1..bfe72ac33 100644
--- a/bin/varnishd/cache/cache_esi.h
+++ b/bin/varnishd/cache/cache_esi.h
@@ -39,8 +39,8 @@
 #define	VEC_S1	(0x60 + 1)
 #define	VEC_S2	(0x60 + 2)
 #define	VEC_S8	(0x60 + 8)
-#define	VEC_INCL_ABRT	'I'
-#define	VEC_INCL_CONT	'i'
+#define	VEC_IA	(0x40 + 9)
+#define	VEC_IC	(0x60 + 9)
 
 typedef ssize_t vep_callback_t(struct vfp_ctx *, void *priv, ssize_t l,
     enum vgz_flag flg);
diff --git a/bin/varnishd/cache/cache_esi_deliver.c b/bin/varnishd/cache/cache_esi_deliver.c
index ac40a77b7..b214e9e94 100644
--- a/bin/varnishd/cache/cache_esi_deliver.c
+++ b/bin/varnishd/cache/cache_esi_deliver.c
@@ -379,11 +379,11 @@ ved_vdp_esi_bytes(struct vdp_ctx *vdx, enum vdp_action act, void **priv,
 				Debug("SKIP1(%d)\n", (int)ecx->l);
 				ecx->state = 4;
 				break;
-			case VEC_INCL_ABRT:
+			case VEC_IA:
 				ecx->abrt =
 				    FEATURE(FEATURE_ESI_INCLUDE_ONERROR);
 				/* FALLTHROUGH */
-			case VEC_INCL_CONT:
+			case VEC_IC:
 				ecx->p++;
 				q = (void*)strchr((const char*)ecx->p, '\0');
 				AN(q);
diff --git a/bin/varnishd/cache/cache_esi_parse.c b/bin/varnishd/cache/cache_esi_parse.c
index 2716c60b2..70835f07f 100644
--- a/bin/varnishd/cache/cache_esi_parse.c
+++ b/bin/varnishd/cache/cache_esi_parse.c
@@ -514,7 +514,7 @@ vep_do_include(struct vep_state *vep, enum dowhat what)
 	l = VSB_len(vep->include_src);
 	h = 0;
 
-	incl = vep->include_continue ? VEC_INCL_CONT : VEC_INCL_ABRT;
+	incl = vep->include_continue ? VEC_IC : VEC_IA;
 
 	if (l > 7 && !memcmp(p, "http://", 7)) {
 		h = p + 7;


More information about the varnish-commit mailing list