Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
845fb2d1
Commit
845fb2d1
authored
May 01, 2020
by
Benjamin Sergeant
Committed by
Oran Agra
Jul 20, 2020
Browse files
Update redis-cli.c
(cherry picked from commit
93021da2
)
parent
930fac80
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
845fb2d1
...
...
@@ -3423,6 +3423,7 @@ static redisReply *clusterManagerMigrateKeysInReply(clusterManagerNode *source,
size_t
*
argv_len
=
NULL
;
int
c
=
(
replace
?
8
:
7
);
if
(
config
.
auth
)
c
+=
2
;
if
(
config
.
user
)
c
+=
1
;
size_t
argc
=
c
+
reply
->
elements
;
size_t
i
,
offset
=
6
;
// Keys Offset
argv
=
zcalloc
(
argc
*
sizeof
(
char
*
));
...
...
@@ -3449,12 +3450,24 @@ static redisReply *clusterManagerMigrateKeysInReply(clusterManagerNode *source,
offset
++
;
}
if
(
config
.
auth
)
{
argv
[
offset
]
=
"AUTH"
;
argv_len
[
offset
]
=
4
;
offset
++
;
argv
[
offset
]
=
config
.
auth
;
argv_len
[
offset
]
=
strlen
(
config
.
auth
);
offset
++
;
if
(
config
.
user
)
{
argv
[
offset
]
=
"AUTH2"
;
argv_len
[
offset
]
=
5
;
offset
++
;
argv
[
offset
]
=
config
.
user
;
argv_len
[
offset
]
=
strlen
(
config
.
user
);
offset
++
;
argv
[
offset
]
=
config
.
auth
;
argv_len
[
offset
]
=
strlen
(
config
.
auth
);
offset
++
;
}
else
{
argv
[
offset
]
=
"AUTH"
;
argv_len
[
offset
]
=
4
;
offset
++
;
argv
[
offset
]
=
config
.
auth
;
argv_len
[
offset
]
=
strlen
(
config
.
auth
);
offset
++
;
}
}
argv
[
offset
]
=
"KEYS"
;
argv_len
[
offset
]
=
4
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment