shell: backends: rtt: Set panic_mode flag

A bug was introduced when fb17d0e365 introduced host presence detection.
Panic_mode flag was added which indicates that RTT should work in
synchronous, blocking mode but it was not set when backend was switched
to panic mode.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruściński 2024-08-07 09:58:52 +02:00 committed by Carles Cufí
commit 5ac99428ea

View file

@ -85,6 +85,9 @@ static int enable(const struct shell_transport *transport, bool blocking)
struct shell_rtt *sh_rtt = (struct shell_rtt *)transport->ctx;
if (blocking) {
if (IS_ENABLED(CONFIG_LOG_MODE_DEFERRED) && IS_ENABLED(CONFIG_SHELL_LOG_BACKEND)) {
panic_mode = true;
}
k_timer_stop(&sh_rtt->timer);
}