From e71448a00d4a42eb5f4e6efe51bcea9ade51e716 Mon Sep 17 00:00:00 2001 From: Yuriy Vynnychek Date: Wed, 20 Apr 2022 15:16:28 +0300 Subject: [PATCH] shell: fix missing "update" for the last RXRDY signal Fixed the issue when sometimes "update" is not called for the last RXRDY signal. First, need to reset the signal and only after that need to call the "update" function. Signed-off-by: Yuriy Vynnychek --- subsys/shell/shell.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/subsys/shell/shell.c b/subsys/shell/shell.c index 291a0fb3396..c113c83b424 100644 --- a/subsys/shell/shell.c +++ b/subsys/shell/shell.c @@ -1330,10 +1330,6 @@ void shell_thread(void *shell_handle, void *arg_log_backend, k_mutex_lock(&shell->ctx->wr_mtx, K_FOREVER); - if (shell->iface->api->update) { - shell->iface->api->update(shell->iface); - } - shell_signal_handle(shell, SHELL_SIGNAL_KILL, kill_handler); shell_signal_handle(shell, SHELL_SIGNAL_RXRDY, shell_process); if (IS_ENABLED(CONFIG_SHELL_LOG_BACKEND)) { @@ -1341,6 +1337,10 @@ void shell_thread(void *shell_handle, void *arg_log_backend, shell_log_process); } + if (shell->iface->api->update) { + shell->iface->api->update(shell->iface); + } + k_mutex_unlock(&shell->ctx->wr_mtx); } }