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:
parent
1885729024
commit
598cd10c34
1 changed files with 3 additions and 3 deletions
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");
|
||||
|
|
Loading…
Reference in a new issue