mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 17:55:07 -05:00
conf: rework local directive to have default stratum
Allow the local directive to be specified without the stratum field. It's an option now, with default value 10. Also, move the parsing code to cmdparse.c to make it available to the client.
This commit is contained in:
8
conf.c
8
conf.c
@@ -817,13 +817,9 @@ parse_log(char *line)
|
||||
static void
|
||||
parse_local(char *line)
|
||||
{
|
||||
int stratum;
|
||||
if (sscanf(line, "stratum%d", &stratum) == 1) {
|
||||
local_stratum = stratum;
|
||||
enable_local = 1;
|
||||
} else {
|
||||
if (!CPS_ParseLocal(line, &local_stratum))
|
||||
command_parse_error();
|
||||
}
|
||||
enable_local = 1;
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
Reference in New Issue
Block a user