Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
f7b5e2d1
Commit
f7b5e2d1
authored
Aug 06, 2014
by
Eiichi Sato
Committed by
antirez
Aug 27, 2014
Browse files
Sentinel: fix bufsize to support IPv6 address
Closes #1914
parent
32a94bec
Changes
1
Show whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
f7b5e2d1
...
@@ -456,7 +456,7 @@ void sentinelIsRunning(void) {
...
@@ -456,7 +456,7 @@ void sentinelIsRunning(void) {
* EINVAL: Invalid port number.
* EINVAL: Invalid port number.
*/
*/
sentinelAddr
*
createSentinelAddr
(
char
*
hostname
,
int
port
)
{
sentinelAddr
*
createSentinelAddr
(
char
*
hostname
,
int
port
)
{
char
buf
[
32
];
char
buf
[
REDIS_IP_STR_LEN
];
sentinelAddr
*
sa
;
sentinelAddr
*
sa
;
if
(
port
<=
0
||
port
>
65535
)
{
if
(
port
<=
0
||
port
>
65535
)
{
...
@@ -2690,7 +2690,7 @@ void sentinelCommand(redisClient *c) {
...
@@ -2690,7 +2690,7 @@ void sentinelCommand(redisClient *c) {
/* SENTINEL MONITOR <name> <ip> <port> <quorum> */
/* SENTINEL MONITOR <name> <ip> <port> <quorum> */
sentinelRedisInstance
*
ri
;
sentinelRedisInstance
*
ri
;
long
quorum
,
port
;
long
quorum
,
port
;
char
buf
[
32
];
char
buf
[
REDIS_IP_STR_LEN
];
if
(
c
->
argc
!=
6
)
goto
numargserr
;
if
(
c
->
argc
!=
6
)
goto
numargserr
;
if
(
getLongFromObjectOrReply
(
c
,
c
->
argv
[
5
],
&
quorum
,
"Invalid quorum"
)
if
(
getLongFromObjectOrReply
(
c
,
c
->
argv
[
5
],
&
quorum
,
"Invalid quorum"
)
...
...
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