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.
This commit is contained in:
Miroslav Lichvar 2024-04-04 15:17:43 +02:00
parent 26ea4e35e7
commit 5235c51801
2 changed files with 2 additions and 0 deletions

View file

@ -239,6 +239,7 @@ typedef struct {
Float distance;
int32_t orphan;
Float activate;
uint32_t reserved[2];
int32_t EOR;
} REQ_Local;

View file

@ -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;
}