CLEANUP: mux-h1; Rename H1S_F_ERROR flag into H1S_F_ERROR_MASK

In fact, H1S_F_ERROR is not a flag but a mask. So rename it to make it
clear.
This commit is contained in:
Christopher Faulet 2022-10-06 09:24:07 +02:00
parent c3fe6f3b7a
commit 7fcbcc0e4c
2 changed files with 3 additions and 3 deletions

View 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 */

View 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);
}