From 5235c51801941753b9d050d646c9fba9842b3959 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Thu, 4 Apr 2024 15:17:43 +0200 Subject: [PATCH] cmdmon: add reserved fields to local command Add two reserved fields initialized to zero to the new REQ_LOCAL3 command to allow adding more options (e.g. delay in activation) without changing the command number again. --- candm.h | 1 + client.c | 1 + 2 files changed, 2 insertions(+) diff --git a/candm.h b/candm.h index b4e41f1..401c015 100644 --- a/candm.h +++ b/candm.h @@ -239,6 +239,7 @@ typedef struct { Float distance; int32_t orphan; Float activate; + uint32_t reserved[2]; int32_t EOR; } REQ_Local; diff --git a/client.c b/client.c index a1e213f..d9f60de 100644 --- a/client.c +++ b/client.c @@ -772,6 +772,7 @@ process_cmd_local(CMD_Request *msg, char *line) msg->data.local.distance = UTI_FloatHostToNetwork(distance); msg->data.local.orphan = htonl(orphan); msg->data.local.activate = UTI_FloatHostToNetwork(activate); + memset(msg->data.local.reserved, 0, sizeof (msg->data.local.reserved)); return 1; }