From d54e63d8dda8a859c16197f181a59e804d165eaf Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Thu, 23 Mar 2023 21:23:36 +0000 Subject: Use NXT_CONF_MAP_BOOL. This replaces the use of NXT_CONF_MAP_INT8 for denoting boolean values. It also makes NXT_CONF_MAP_BOOL an alias for NXT_CONF_MAP_INT8 in nxt_conf_map_object(). A future commit will remove NXT_CONF_MAP_INT8. Reviewed-by: Alejandro Colomar Signed-off-by: Andrew Clayton --- src/nxt_conf.c | 1 + src/nxt_router.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/nxt_conf.c b/src/nxt_conf.c index d04aa45c..9bb61396 100644 --- a/src/nxt_conf.c +++ b/src/nxt_conf.c @@ -607,6 +607,7 @@ nxt_conf_map_object(nxt_mp_t *mp, nxt_conf_value_t *value, nxt_conf_map_t *map, switch (map[i].type) { + case NXT_CONF_MAP_BOOL: case NXT_CONF_MAP_INT8: if (v->type == NXT_CONF_VALUE_BOOLEAN) { diff --git a/src/nxt_router.c b/src/nxt_router.c index aa033ced..e6a342b0 100644 --- a/src/nxt_router.c +++ b/src/nxt_router.c @@ -1510,13 +1510,13 @@ static nxt_conf_map_t nxt_router_http_conf[] = { { nxt_string("discard_unsafe_fields"), - NXT_CONF_MAP_INT8, + NXT_CONF_MAP_BOOL, offsetof(nxt_socket_conf_t, discard_unsafe_fields), }, { nxt_string("log_route"), - NXT_CONF_MAP_INT8, + NXT_CONF_MAP_BOOL, offsetof(nxt_socket_conf_t, log_route), }, }; -- cgit