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
d1f22eac
Commit
d1f22eac
authored
Feb 16, 2020
by
Madelyn Olson
Committed by
antirez
Feb 27, 2020
Browse files
Give an error message if you specify redirect twice
parent
762fbcb6
Changes
1
Show whitespace changes
Inline
Side-by-side
src/networking.c
View file @
d1f22eac
...
@@ -2233,6 +2233,13 @@ NULL
...
@@ -2233,6 +2233,13 @@ NULL
if
(
!
strcasecmp
(
c
->
argv
[
j
]
->
ptr
,
"redirect"
)
&&
moreargs
)
{
if
(
!
strcasecmp
(
c
->
argv
[
j
]
->
ptr
,
"redirect"
)
&&
moreargs
)
{
j
++
;
j
++
;
if
(
redir
!=
0
)
{
addReplyError
(
c
,
"A client can only redirect to a single "
"other client"
);
zfree
(
prefix
);
return
;
}
if
(
getLongLongFromObjectOrReply
(
c
,
c
->
argv
[
j
],
&
redir
,
NULL
)
!=
if
(
getLongLongFromObjectOrReply
(
c
,
c
->
argv
[
j
],
&
redir
,
NULL
)
!=
C_OK
)
C_OK
)
{
{
...
...
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