[master] 7456b1673 h2: Log the htc status name for easier debugging
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Fri Aug 20 16:28:06 UTC 2021
commit 7456b1673a9600779f92c3184c6a50036cc433ac
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Fri Aug 20 14:23:23 2021 +0200
h2: Log the htc status name for easier debugging
diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index 3597ec169..05944f49e 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -1115,6 +1115,7 @@ h2_rxframe(struct worker *wrk, struct h2_sess *h2)
enum htc_status_e hs;
h2_frame h2f;
h2_error h2e;
+ const char *s = NULL;
char b[8];
ASSERT_RXTHR(h2);
@@ -1134,8 +1135,12 @@ h2_rxframe(struct worker *wrk, struct h2_sess *h2)
/* FALLTHROUGH */
default:
/* XXX: HTC_S_OVERFLOW / FRAME_SIZE_ERROR handling */
+#define HTC_STATUS(e, n, d, l) \
+ if (hs == HTC_S_ ## e) \
+ s = #e;
+#include "tbl/htc.h"
Lck_Lock(&h2->sess->mtx);
- VSLb(h2->vsl, SLT_Debug, "H2: No frame (hs=%d)", hs);
+ VSLb(h2->vsl, SLT_Debug, "H2: No frame (hs=%s)", s);
h2->error = H2CE_NO_ERROR;
Lck_Unlock(&h2->sess->mtx);
return (0);
More information about the varnish-commit
mailing list