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
4bff45c7
Unverified
Commit
4bff45c7
authored
Jul 17, 2018
by
Salvatore Sanfilippo
Committed by
GitHub
Jul 17, 2018
Browse files
Merge pull request #5136 from 0xtonyxia/fix-xread-id-parse
Fix xreadgroup with '$' ID.
parents
afc7e08a
846cf12a
Changes
1
Show whitespace changes
Inline
Side-by-side
src/t_stream.c
View file @
4bff45c7
...
@@ -1351,6 +1351,11 @@ void xreadCommand(client *c) {
...
@@ -1351,6 +1351,11 @@ void xreadCommand(client *c) {
}
}
if
(
strcmp
(
c
->
argv
[
i
]
->
ptr
,
"$"
)
==
0
)
{
if
(
strcmp
(
c
->
argv
[
i
]
->
ptr
,
"$"
)
==
0
)
{
if
(
xreadgroup
)
{
addReplyError
(
c
,
"The $ ID can be specified only when calling "
"XREAD without GROUP option."
);
goto
cleanup
;
}
if
(
o
)
{
if
(
o
)
{
stream
*
s
=
o
->
ptr
;
stream
*
s
=
o
->
ptr
;
ids
[
id_idx
]
=
s
->
last_id
;
ids
[
id_idx
]
=
s
->
last_id
;
...
@@ -1360,7 +1365,7 @@ void xreadCommand(client *c) {
...
@@ -1360,7 +1365,7 @@ void xreadCommand(client *c) {
}
}
continue
;
continue
;
}
else
if
(
strcmp
(
c
->
argv
[
i
]
->
ptr
,
">"
)
==
0
)
{
}
else
if
(
strcmp
(
c
->
argv
[
i
]
->
ptr
,
">"
)
==
0
)
{
if
(
!
xreadgroup
||
groupname
==
NULL
)
{
if
(
!
xreadgroup
)
{
addReplyError
(
c
,
"The > ID can be specified only when calling "
addReplyError
(
c
,
"The > ID can be specified only when calling "
"XREADGROUP using the GROUP <group> "
"XREADGROUP using the GROUP <group> "
"<consumer> option."
);
"<consumer> option."
);
...
...
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