From dba1add060749e8c36c53e7b30e5ae343437c933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Trojnara?= Date: Wed, 8 Jan 2025 18:05:58 +0100 Subject: [PATCH] Reorder CMD_DEBUG_LEVEL processing to match definition order --- src/eng_back.c | 4 ++-- src/eng_front.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/eng_back.c b/src/eng_back.c index cf00326d..345a56df 100644 --- a/src/eng_back.c +++ b/src/eng_back.c @@ -1200,8 +1200,6 @@ int ctx_engine_ctrl(ENGINE_CTX *ctx, int cmd, long i, void *p, void (*f)()) return ctx_ctrl_set_module(ctx, (const char *)p); case CMD_PIN: return ctx_ctrl_set_pin(ctx, (const char *)p); - case CMD_DEBUG_LEVEL: - return ctx_ctrl_set_debug_level(ctx, (int)i); case CMD_VERBOSE: return ctx_ctrl_set_debug_level(ctx, 7); case CMD_QUIET: @@ -1222,6 +1220,8 @@ int ctx_engine_ctrl(ENGINE_CTX *ctx, int cmd, long i, void *p, void (*f)()) return ctx_enumerate_slots(ctx); case CMD_VLOG_A: return ctx_ctrl_set_vlog(ctx, p); + case CMD_DEBUG_LEVEL: + return ctx_ctrl_set_debug_level(ctx, (int)i); default: ENGerr(ENG_F_CTX_ENGINE_CTRL, ENG_R_UNKNOWN_COMMAND); break; diff --git a/src/eng_front.c b/src/eng_front.c index f66e7f90..86a6a8e1 100644 --- a/src/eng_front.c +++ b/src/eng_front.c @@ -48,10 +48,6 @@ static const ENGINE_CMD_DEFN engine_cmd_defns[] = { "PIN", "Specifies the pin code", ENGINE_CMD_FLAG_STRING}, - {CMD_DEBUG_LEVEL, - "DEBUG_LEVEL", - "Set the debug level: 0=emerg, 1=alert, 2=crit, 3=err, 4=warning, 5=notice (default), 6=info, 7=debug", - ENGINE_CMD_FLAG_NUMERIC}, {CMD_VERBOSE, "VERBOSE", "Print additional details", @@ -88,6 +84,10 @@ static const ENGINE_CMD_DEFN engine_cmd_defns[] = { "VLOG_A", "Set the logging callback", ENGINE_CMD_FLAG_INTERNAL}, + {CMD_DEBUG_LEVEL, + "DEBUG_LEVEL", + "Set the debug level: 0=emerg, 1=alert, 2=crit, 3=err, 4=warning, 5=notice (default), 6=info, 7=debug", + ENGINE_CMD_FLAG_NUMERIC}, {0, NULL, NULL, 0} };