Commit 35507e78 authored by antirez's avatar antirez
Browse files

Sentinel: command arity check added where missing.

parent fa81cc26
...@@ -2791,6 +2791,7 @@ void sentinelCommand(redisClient *c) { ...@@ -2791,6 +2791,7 @@ void sentinelCommand(redisClient *c) {
addReply(c,shared.ok); addReply(c,shared.ok);
} }
} else if (!strcasecmp(c->argv[1]->ptr,"flushconfig")) { } else if (!strcasecmp(c->argv[1]->ptr,"flushconfig")) {
if (c->argc != 2) goto numargserr;
sentinelFlushConfig(); sentinelFlushConfig();
addReply(c,shared.ok); addReply(c,shared.ok);
return; return;
...@@ -2798,6 +2799,7 @@ void sentinelCommand(redisClient *c) { ...@@ -2798,6 +2799,7 @@ void sentinelCommand(redisClient *c) {
/* SENTINEL REMOVE <name> */ /* SENTINEL REMOVE <name> */
sentinelRedisInstance *ri; sentinelRedisInstance *ri;
if (c->argc != 3) goto numargserr;
if ((ri = sentinelGetMasterByNameOrReplyError(c,c->argv[2])) if ((ri = sentinelGetMasterByNameOrReplyError(c,c->argv[2]))
== NULL) return; == NULL) return;
sentinelEvent(REDIS_WARNING,"-monitor",ri,"%@"); sentinelEvent(REDIS_WARNING,"-monitor",ri,"%@");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment