cli: fix up parsing of geo-replication status
Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2785 (gsyncd logs on slave side go to /dev/null) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2785
This commit is contained in:
parent
775323c1b2
commit
625f779dba
@ -1168,15 +1168,18 @@ cli_cmd_gsync_set_parse (const char **words, int wordcount, dict_t **options)
|
||||
cmdi = slavei + 1;
|
||||
if (slavei == 3)
|
||||
masteri = 2;
|
||||
} else if (i == 2) {
|
||||
} else if (i <= 3) {
|
||||
/* no $s, can only be status cmd
|
||||
* (with either a single $m before it or nothing;
|
||||
* i remaining 2 is a good check for this condition)
|
||||
* (with either a single $m before it or nothing)
|
||||
* -- these conditions imply that i <= 3 after
|
||||
* the iteration and that i is the successor of
|
||||
* the (0 or 1 length) sequence of $m-s.
|
||||
*/
|
||||
cmdi = wordcount - 1;
|
||||
if (i < cmdi)
|
||||
masteri = i;
|
||||
}
|
||||
cmdi = i;
|
||||
if (i == 3)
|
||||
masteri = 2;
|
||||
} else
|
||||
goto out;
|
||||
|
||||
/* now check if input really complies syntax
|
||||
* (in a somewhat redundant way, in favor
|
||||
|
Loading…
x
Reference in New Issue
Block a user