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
920e108f
Commit
920e108f
authored
Dec 20, 2019
by
antirez
Browse files
Fix ip and missing mode in RM_GetClusterNodeInfo().
parent
7569b210
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
920e108f
...
...
@@ -4378,10 +4378,13 @@ int RM_GetClusterNodeInfo(RedisModuleCtx *ctx, const char *id, char *ip, char *m
UNUSED
(
ctx
);
clusterNode
*
node
=
clusterLookupNode
(
id
);
if
(
node
->
flags
&
(
CLUSTER_NODE_NOADDR
|
CLUSTER_NODE_HANDSHAKE
))
if
(
node
==
NULL
||
node
->
flags
&
(
CLUSTER_NODE_NOADDR
|
CLUSTER_NODE_HANDSHAKE
))
{
return
REDISMODULE_ERR
;
}
if
(
ip
)
mem
cpy
(
ip
,
node
->
name
,
REDISMODULE_NODE_ID
_LEN
);
if
(
ip
)
strn
cpy
(
ip
,
node
->
ip
,
NET_IP_STR
_LEN
);
if
(
master_id
)
{
/* If the information is not available, the function will set the
...
...
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