]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: mux-h1; Rename H1S_F_ERROR flag into H1S_F_ERROR_MASK
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 6 Oct 2022 07:24:07 +0000 (09:24 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 17 Nov 2022 13:33:14 +0000 (14:33 +0100)
In fact, H1S_F_ERROR is not a flag but a mask. So rename it to make it
clear.

include/haproxy/mux_h1-t.h
src/mux_h1.c

index 18e0c0f42abec631f102dcec196c8f2cbad93092..8cbb95ecd71f2e7465586d9e824c2b3ab9e424e2 100644 (file)
@@ -105,7 +105,7 @@ static forceinline char *h1c_show_flags(char *buf, size_t len, const char *delim
 #define H1S_F_NOT_IMPL_ERROR 0x00000400 /* Set when a feature is not implemented during the message parsing */
 #define H1S_F_PARSING_ERROR  0x00000800 /* Set when an error occurred during the message parsing */
 #define H1S_F_PROCESSING_ERROR 0x00001000 /* Set when an error occurred during the message xfer */
-#define H1S_F_ERROR          0x00001800 /* stream error mask */
+#define H1S_F_ERROR_MASK     0x00001800 /* stream error mask */
 
 #define H1S_F_HAVE_SRV_NAME  0x00002000 /* Set during output process if the server name header was added to the request */
 #define H1S_F_HAVE_O_CONN    0x00004000 /* Set during output process to know connection mode was processed */
index 27d915c748330a916176bccedac1e2fe6699780d..ac415fa383f178f349e71971fb73afd9c4cb5bdc 100644 (file)
@@ -439,7 +439,7 @@ static inline int h1_recv_allowed(const struct h1c *h1c)
                return 0;
        }
 
-       if (h1c->h1s && (h1c->h1s->flags & H1S_F_ERROR)) {
+       if (h1c->h1s && (h1c->h1s->flags & H1S_F_ERROR_MASK)) {
                TRACE_DEVEL("recv not allowed because of error on h1s", H1_EV_H1C_RECV|H1_EV_H1C_BLK, h1c->conn);
                return 0;
        }
@@ -836,7 +836,7 @@ static void h1s_destroy(struct h1s *h1s)
                                H1C_F_ST_EMBRYONIC|H1C_F_ST_ATTACHED|H1C_F_ST_READY|
                                H1C_F_OUT_FULL|H1C_F_OUT_ALLOC|H1C_F_IN_SALLOC|
                                H1C_F_CO_MSG_MORE|H1C_F_CO_STREAMER);
-               if (h1s->flags & H1S_F_ERROR) {
+               if (h1s->flags & H1S_F_ERROR_MASK) {
                        h1c->flags |= H1C_F_ST_ERROR;
                        TRACE_ERROR("h1s on error, set error on h1c", H1_EV_H1S_END|H1_EV_H1C_ERR, h1c->conn, h1s);
                }