[master] d4b5767be http2: Unique names for errors

Nils Goroll nils.goroll at uplex.de
Mon Feb 24 11:01:09 UTC 2025


commit d4b5767be34945c06fdd58861ac138216758e63d
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Mon Feb 24 11:59:26 2025 +0100

    http2: Unique names for errors
    
    Connection and stream errors are not the same thing, so our error reporting
    should also use unambiguous names.

diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index ba21ea5c6..ca8092ee5 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -48,9 +48,9 @@
 
 #define H2_CUSTOM_ERRORS
 #define H2EC1(U,v,g,r,d)	\
-	const struct h2_error_s H2CE_##U[1] = {{#U,d,v,0,1,g,r}};
+	const struct h2_error_s H2CE_##U[1] = {{"H2CE_" #U,d,v,0,1,g,r}};
 #define H2EC2(U,v,g,r,d)	\
-	const struct h2_error_s H2SE_##U[1] = {{#U,d,v,1,0,g,r}};
+	const struct h2_error_s H2SE_##U[1] = {{"H2SE_" #U,d,v,1,0,g,r}};
 #define H2EC3(U,v,g,r,d) H2EC1(U,v,g,r,d) H2EC2(U,v,g,r,d)
 #define H2_ERROR(NAME, val, sc, goaway, reason, desc)	\
 	H2EC##sc(NAME, val, goaway, reason, desc)


More information about the varnish-commit mailing list