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
75e68625
Commit
75e68625
authored
Oct 23, 2014
by
Matt Stancliff
Committed by
antirez
Oct 31, 2014
Browse files
Parse cluster state file in IPv6 compatible way
We need to pick the port based on the _last_ colon, not the first one.
parent
bb0ff49e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
75e68625
...
...
@@ -178,7 +178,7 @@ int clusterLoadConfig(char *filename) {
clusterAddNode
(
n
);
}
/* Address and port */
if
((
p
=
strchr
(
argv
[
1
],
':'
))
==
NULL
)
goto
fmterr
;
if
((
p
=
str
r
chr
(
argv
[
1
],
':'
))
==
NULL
)
goto
fmterr
;
*
p
=
'\0'
;
memcpy
(
n
->
ip
,
argv
[
1
],
strlen
(
argv
[
1
])
+
1
);
n
->
port
=
atoi
(
p
+
1
);
...
...
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