From 6e4dd9302df5e6d576a18e22bd86167d0296a7d2 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Fri, 29 Jan 2016 15:35:32 +0100 Subject: [PATCH] cmdmon: allow unhandled commands Replace the assert() with a debug message to not crash if someone forgets to implement a newly defined command. --- cmdmon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmdmon.c b/cmdmon.c index 61b2e89..b95b8b9 100644 --- a/cmdmon.c +++ b/cmdmon.c @@ -1565,7 +1565,8 @@ read_from_cmd_socket(void *anything) break; default: - assert(0); + DEBUG_LOG(LOGF_CmdMon, "Unhandled command %d", rx_command); + tx_message.status = htons(STT_FAILED); break; } } else {