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
d2b8281b
Commit
d2b8281b
authored
Feb 27, 2013
by
antirez
Browse files
Cluster: added a missing return on CLUSTER SETSLOT.
parent
7ddc0fe6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
d2b8281b
...
@@ -1669,8 +1669,11 @@ void clusterCommand(redisClient *c) {
...
@@ -1669,8 +1669,11 @@ void clusterCommand(redisClient *c) {
/* CLUSTER SETSLOT <SLOT> NODE <NODE ID> */
/* CLUSTER SETSLOT <SLOT> NODE <NODE ID> */
clusterNode
*
n
=
clusterLookupNode
(
c
->
argv
[
4
]
->
ptr
);
clusterNode
*
n
=
clusterLookupNode
(
c
->
argv
[
4
]
->
ptr
);
if (!n) addReplyErrorFormat(c,"Unknown node %s",
if
(
!
n
)
{
(char*)c->argv[4]->ptr);
addReplyErrorFormat
(
c
,
"Unknown node %s"
,
(
char
*
)
c
->
argv
[
4
]
->
ptr
);
return
;
}
/* If this hash slot was served by 'myself' before to switch
/* If this hash slot was served by 'myself' before to switch
* make sure there are no longer local keys for this hash slot. */
* make sure there are no longer local keys for this hash slot. */
if
(
server
.
cluster
->
slots
[
slot
]
==
server
.
cluster
->
myself
&&
if
(
server
.
cluster
->
slots
[
slot
]
==
server
.
cluster
->
myself
&&
...
...
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