cmdmon: include filter length in ADD_SERVER/ADD_PEER request
This commit is contained in:
parent
8aa4ae027b
commit
9931a9166b
3 changed files with 4 additions and 2 deletions
3
candm.h
3
candm.h
|
@ -276,7 +276,8 @@ typedef struct {
|
|||
Float asymmetry;
|
||||
Float offset;
|
||||
uint32_t flags;
|
||||
uint32_t reserved[4];
|
||||
int32_t filter_length;
|
||||
uint32_t reserved[3];
|
||||
int32_t EOR;
|
||||
} REQ_NTP_Source;
|
||||
|
||||
|
|
1
client.c
1
client.c
|
@ -1122,6 +1122,7 @@ process_cmd_add_server_or_peer(CMD_Request *msg, char *line)
|
|||
(data.params.sel_options & SRC_SELECT_NOSELECT ? REQ_ADDSRC_NOSELECT : 0) |
|
||||
(data.params.sel_options & SRC_SELECT_TRUST ? REQ_ADDSRC_TRUST : 0) |
|
||||
(data.params.sel_options & SRC_SELECT_REQUIRE ? REQ_ADDSRC_REQUIRE : 0));
|
||||
msg->data.ntp_source.filter_length = htonl(data.params.filter_length);
|
||||
memset(msg->data.ntp_source.reserved, 0, sizeof (msg->data.ntp_source.reserved));
|
||||
|
||||
result = 1;
|
||||
|
|
2
cmdmon.c
2
cmdmon.c
|
@ -800,7 +800,7 @@ handle_add_source(NTP_Source_Type type, CMD_Request *rx_message, CMD_Reply *tx_m
|
|||
params.max_sources = ntohl(rx_message->data.ntp_source.max_sources);
|
||||
params.min_samples = ntohl(rx_message->data.ntp_source.min_samples);
|
||||
params.max_samples = ntohl(rx_message->data.ntp_source.max_samples);
|
||||
params.filter_length = 0;
|
||||
params.filter_length = ntohl(rx_message->data.ntp_source.filter_length);
|
||||
params.authkey = ntohl(rx_message->data.ntp_source.authkey);
|
||||
params.max_delay = UTI_FloatNetworkToHost(rx_message->data.ntp_source.max_delay);
|
||||
params.max_delay_ratio =
|
||||
|
|
Loading…
Reference in a new issue