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 <jamie.mccrae@nordicsemi.no>
diff --git a/boot/boot_serial/src/boot_serial.c b/boot/boot_serial/src/boot_serial.c
index 31ea0c7..5213866 100644
--- a/boot/boot_serial/src/boot_serial.c
+++ b/boot/boot_serial/src/boot_serial.c
@@ -1023,11 +1023,11 @@
}
} 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;