]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
cmdmon: allow unhandled commands
authorMiroslav Lichvar <mlichvar@redhat.com>
Fri, 29 Jan 2016 14:35:32 +0000 (15:35 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 29 Jan 2016 16:55:58 +0000 (17:55 +0100)
Replace the assert() with a debug message to not crash if someone
forgets to implement a newly defined command.

cmdmon.c

index 61b2e8937ba2d561f93db5ab4aa62adc277d33de..b95b8b9856d5f891a9bb1aed3ad621e6240ba07a 100644 (file)
--- 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 {