Merge pull request #6397 from trevor211/fixConfigWrongFormatHandling

Fix bad handling of unexpected yesno option
This commit is contained in:
Salvatore Sanfilippo 2019-09-20 11:14:38 +02:00 committed by GitHub
commit f42ac40d7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -672,6 +672,9 @@ void loadServerConfigFromString(char *config) {
server.lua_time_limit = strtoll(argv[1],NULL,10);
} else if (!strcasecmp(argv[0],"lua-replicate-commands") && argc == 2) {
server.lua_always_replicate_commands = yesnotoi(argv[1]);
if ((server.lua_always_replicate_commands = yesnotoi(argv[1])) == -1) {
err = "argument must be 'yes' or 'no'"; goto loaderr;
}
} else if (!strcasecmp(argv[0],"slowlog-log-slower-than") &&
argc == 2)
{