mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:35:06 -05:00
client: ignore case in add command
For consistency with chronyd configuration, make the source type in the add command case insensitive.
This commit is contained in:
6
client.c
6
client.c
@@ -1057,11 +1057,11 @@ process_cmd_add_source(CMD_Request *msg, char *line)
|
||||
word = line;
|
||||
line = CPS_SplitWord(line);
|
||||
|
||||
if (!strcmp(word, "server")) {
|
||||
if (!strcasecmp(word, "server")) {
|
||||
type = REQ_ADDSRC_SERVER;
|
||||
} else if (!strcmp(word, "peer")) {
|
||||
} else if (!strcasecmp(word, "peer")) {
|
||||
type = REQ_ADDSRC_PEER;
|
||||
} else if (!strcmp(word, "pool")) {
|
||||
} else if (!strcasecmp(word, "pool")) {
|
||||
type = REQ_ADDSRC_POOL;
|
||||
} else {
|
||||
LOG(LOGS_ERR, "Invalid syntax for add command");
|
||||
|
||||
Reference in New Issue
Block a user