mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:35:06 -05:00
sources: allow setting minsamples and maxsamples for each source
The minsamples and maxsamples directives now set the default value, which can be overriden for individual sources in the server/peer/pool and refclock directives.
This commit is contained in:
16
client.c
16
client.c
@@ -965,6 +965,16 @@ process_cmd_add_server_or_peer(CMD_Request *msg, char *line)
|
||||
break;
|
||||
}
|
||||
|
||||
if (data.params.min_samples != SRC_DEFAULT_MINSAMPLES) {
|
||||
fprintf(stderr, "Option minsamples not supported\n");
|
||||
break;
|
||||
}
|
||||
|
||||
if (data.params.max_samples != SRC_DEFAULT_MAXSAMPLES) {
|
||||
fprintf(stderr, "Option maxsamples not supported\n");
|
||||
break;
|
||||
}
|
||||
|
||||
msg->data.ntp_source.port = htonl((unsigned long) data.port);
|
||||
UTI_IPHostToNetwork(&ip_addr, &msg->data.ntp_source.ip_addr);
|
||||
msg->data.ntp_source.minpoll = htonl(data.params.minpoll);
|
||||
@@ -1024,6 +1034,12 @@ process_cmd_add_server_or_peer(CMD_Request *msg, char *line)
|
||||
case CPS_BadMaxsources:
|
||||
fprintf(stderr, "Unreadable maxsources value\n");
|
||||
break;
|
||||
case CPS_BadMinsamples:
|
||||
fprintf(stderr, "Unreadable minsamples value\n");
|
||||
break;
|
||||
case CPS_BadMaxsamples:
|
||||
fprintf(stderr, "Unreadable maxsamples value\n");
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user