From d01b63071bee6698a5234e032eb449c6394ce517 Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Mon, 6 Nov 2023 14:25:57 +0000 Subject: [PATCH] boot_serial: Fix missing response if echo command disabled Fixes an issue whereby when an echo command is sent in serial recovery mode, if it is disabled, there would just be no response at all, which is invalid operation Signed-off-by: Jamie McCrae --- boot/boot_serial/src/boot_serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boot/boot_serial/src/boot_serial.c b/boot/boot_serial/src/boot_serial.c index 31ea0c7cc..5213866ad 100644 --- a/boot/boot_serial/src/boot_serial.c +++ b/boot/boot_serial/src/boot_serial.c @@ -1023,11 +1023,11 @@ boot_serial_input(char *buf, int len) } } else if (hdr->nh_group == MGMT_GROUP_ID_DEFAULT) { switch (hdr->nh_id) { - case NMGR_ID_ECHO: #ifdef MCUBOOT_BOOT_MGMT_ECHO + case NMGR_ID_ECHO: bs_echo(buf, len); -#endif break; +#endif case NMGR_ID_CONS_ECHO_CTRL: bs_rc_rsp(0); break;