X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/31a1439bfd6e24647f023281da65473047b69dfb..91c15ed1b51a0cd097e5c8b0d77edb07f460a866:/src/config.c diff --git a/src/config.c b/src/config.c index cf614008..9e247d66 100644 --- a/src/config.c +++ b/src/config.c @@ -354,6 +354,17 @@ void loadServerConfigFromString(char *config) { if ((server.stop_writes_on_bgsave_err = yesnotoi(argv[1])) == -1) { err = "argument must be 'yes' or 'no'"; goto loaderr; } + } else if (!strcasecmp(argv[0],"sentinel")) { + /* argc == 1 is handled by main() as we need to enter the sentinel + * mode ASAP. */ + if (argc != 1) { + if (!server.sentinel_mode) { + err = "sentinel directive while not in sentinel mode"; + goto loaderr; + } + err = sentinelHandleConfiguration(argv+1,argc-1); + if (err) goto loaderr; + } } else { err = "Bad directive or wrong number of arguments"; goto loaderr; }