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
e00cb78f
Commit
e00cb78f
authored
Feb 25, 2015
by
Salvatore Sanfilippo
Browse files
Merge pull request #2054 from mattsta/fix-set-sentinel-quorum
Sentinel: Add initial quorum bounds check
parents
47ab5704
6739ef44
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
e00cb78f
...
@@ -2741,6 +2741,12 @@ void sentinelCommand(redisClient *c) {
...
@@ -2741,6 +2741,12 @@ void sentinelCommand(redisClient *c) {
!=
REDIS_OK
)
return
;
!=
REDIS_OK
)
return
;
if
(
getLongFromObjectOrReply
(
c
,
c
->
argv
[
4
],
&
port
,
"Invalid port"
)
if
(
getLongFromObjectOrReply
(
c
,
c
->
argv
[
4
],
&
port
,
"Invalid port"
)
!=
REDIS_OK
)
return
;
!=
REDIS_OK
)
return
;
if
(
quorum
<=
0
)
{
addReplyError
(
c
,
"Quorum must be 1 or greater."
);
return
;
}
/* Make sure the IP field is actually a valid IP before passing it
/* Make sure the IP field is actually a valid IP before passing it
* to createSentinelRedisInstance(), otherwise we may trigger a
* to createSentinelRedisInstance(), otherwise we may trigger a
* DNS lookup at runtime. */
* DNS lookup at runtime. */
...
...
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