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:
parent
26ea4e35e7
commit
5235c51801
2 changed files with 2 additions and 0 deletions
1
candm.h
1
candm.h
|
@ -239,6 +239,7 @@ typedef struct {
|
||||||
Float distance;
|
Float distance;
|
||||||
int32_t orphan;
|
int32_t orphan;
|
||||||
Float activate;
|
Float activate;
|
||||||
|
uint32_t reserved[2];
|
||||||
int32_t EOR;
|
int32_t EOR;
|
||||||
} REQ_Local;
|
} REQ_Local;
|
||||||
|
|
||||||
|
|
1
client.c
1
client.c
|
@ -772,6 +772,7 @@ process_cmd_local(CMD_Request *msg, char *line)
|
||||||
msg->data.local.distance = UTI_FloatHostToNetwork(distance);
|
msg->data.local.distance = UTI_FloatHostToNetwork(distance);
|
||||||
msg->data.local.orphan = htonl(orphan);
|
msg->data.local.orphan = htonl(orphan);
|
||||||
msg->data.local.activate = UTI_FloatHostToNetwork(activate);
|
msg->data.local.activate = UTI_FloatHostToNetwork(activate);
|
||||||
|
memset(msg->data.local.reserved, 0, sizeof (msg->data.local.reserved));
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue