Commit b72cecd7 authored by antirez's avatar antirez
Browse files

Sentinel command renaming: fix CONFIG SET after refactoring.

parent 91a384a5
...@@ -3388,12 +3388,12 @@ void sentinelSetCommand(client *c) { ...@@ -3388,12 +3388,12 @@ void sentinelSetCommand(client *c) {
for (j = 3; j < c->argc; j++) { for (j = 3; j < c->argc; j++) {
int moreargs = (c->argc-1) - j; int moreargs = (c->argc-1) - j;
option = c->argv[j]->ptr; option = c->argv[j]->ptr;
robj *o = c->argv[j+1];
long long ll; long long ll;
int old_j = j; /* Used to know what to log as an event. */
if (!strcasecmp(option,"down-after-milliseconds") && moreargs > 0) { if (!strcasecmp(option,"down-after-milliseconds") && moreargs > 0) {
/* down-after-millisecodns <milliseconds> */ /* down-after-millisecodns <milliseconds> */
value = c->argv[++j]->ptr; robj *o = c->argv[++j];
if (getLongLongFromObject(o,&ll) == C_ERR || ll <= 0) if (getLongLongFromObject(o,&ll) == C_ERR || ll <= 0)
goto badfmt; goto badfmt;
ri->down_after_period = ll; ri->down_after_period = ll;
...@@ -3401,14 +3401,14 @@ void sentinelSetCommand(client *c) { ...@@ -3401,14 +3401,14 @@ void sentinelSetCommand(client *c) {
changes++; changes++;
} else if (!strcasecmp(option,"failover-timeout") && moreargs > 0) { } else if (!strcasecmp(option,"failover-timeout") && moreargs > 0) {
/* failover-timeout <milliseconds> */ /* failover-timeout <milliseconds> */
value = c->argv[++j]->ptr; robj *o = c->argv[++j];
if (getLongLongFromObject(o,&ll) == C_ERR || ll <= 0) if (getLongLongFromObject(o,&ll) == C_ERR || ll <= 0)
goto badfmt; goto badfmt;
ri->failover_timeout = ll; ri->failover_timeout = ll;
changes++; changes++;
} else if (!strcasecmp(option,"parallel-syncs") && moreargs > 0) { } else if (!strcasecmp(option,"parallel-syncs") && moreargs > 0) {
/* parallel-syncs <milliseconds> */ /* parallel-syncs <milliseconds> */
value = c->argv[++j]->ptr; robj *o = c->argv[++j];
if (getLongLongFromObject(o,&ll) == C_ERR || ll <= 0) if (getLongLongFromObject(o,&ll) == C_ERR || ll <= 0)
goto badfmt; goto badfmt;
ri->parallel_syncs = ll; ri->parallel_syncs = ll;
...@@ -3462,7 +3462,7 @@ void sentinelSetCommand(client *c) { ...@@ -3462,7 +3462,7 @@ void sentinelSetCommand(client *c) {
changes++; changes++;
} else if (!strcasecmp(option,"quorum") && moreargs > 0) { } else if (!strcasecmp(option,"quorum") && moreargs > 0) {
/* quorum <count> */ /* quorum <count> */
value = c->argv[++j]->ptr; robj *o = c->argv[++j];
if (getLongLongFromObject(o,&ll) == C_ERR || ll <= 0) if (getLongLongFromObject(o,&ll) == C_ERR || ll <= 0)
goto badfmt; goto badfmt;
ri->quorum = ll; ri->quorum = ll;
......
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