Fix error "repl-backlog-size must be 1 or greater"

The parameter repl-backlog-size is not parsed correctly in the configuration file. argv[0] is parsed instead of argv[1].
This commit is contained in:
Arnaud Granal 2013-02-25 19:25:48 +02:00
parent 18f537083a
commit 3d588b37ce

View File

@ -240,7 +240,7 @@ void loadServerConfigFromString(char *config) {
err = "argument must be 'yes' or 'no'"; goto loaderr; err = "argument must be 'yes' or 'no'"; goto loaderr;
} }
} else if (!strcasecmp(argv[0],"repl-backlog-size") && argc == 2) { } else if (!strcasecmp(argv[0],"repl-backlog-size") && argc == 2) {
long long size = strtoll(argv[0],NULL,10); long long size = strtoll(argv[1],NULL,10);
if (size <= 0) { if (size <= 0) {
err = "repl-backlog-size must be 1 or greater."; err = "repl-backlog-size must be 1 or greater.";
goto loaderr; goto loaderr;