mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-10 17:32:03 -04:00
BUG/MINOR: h2: make tune.h2.log-errors actually work
Commite67e36c9ebintroduced tune.h2.log-errors, that would let you pick if you wanted to know about stream errors, connection errors, or no error. However, a logic error made it so no error will be picked for any value except for "none", in which case connection would be picked. Fix that by just checking the strcmp() return value correctly. This should be backported wherevere67e36c9ebhas been backported.
This commit is contained in:
parent
dbf471f99a
commit
915a58c3c1
1 changed files with 3 additions and 3 deletions
|
|
@ -8738,11 +8738,11 @@ static int h2_parse_log_errors(char **args, int section_type, struct proxy *curp
|
|||
|
||||
/* backend/frontend/default */
|
||||
vptr = &h2_settings_log_errors;
|
||||
if (strcmp(args[1], "none"))
|
||||
if (strcmp(args[1], "none") == 0)
|
||||
*vptr = H2_ERR_LOG_ERR_NONE;
|
||||
else if (strcmp(args[1], "connection"))
|
||||
else if (strcmp(args[1], "connection") == 0)
|
||||
*vptr = H2_ERR_LOG_ERR_CONN;
|
||||
else if (strcmp(args[1], "stream"))
|
||||
else if (strcmp(args[1], "stream") == 0)
|
||||
*vptr = H2_ERR_LOG_ERR_STRM;
|
||||
else {
|
||||
memprintf(err, "'%s' expects 'none', 'connection', or 'stream'", args[0]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue