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
b8e52321
Commit
b8e52321
authored
Jan 19, 2018
by
antirez
Browse files
CG: fix parsing in XREADGROUP and streamLookupCG() NULL check.
parent
bd1c11dc
Changes
1
Show whitespace changes
Inline
Side-by-side
src/t_stream.c
View file @
b8e52321
...
...
@@ -976,8 +976,8 @@ void xreadCommand(client *c) {
"XREADGROUP. You called XREAD instead."
);
return
;
}
groupname
=
c
->
argv
[
i
]
->
ptr
;
consumername
=
c
->
argv
[
i
+
1
]
->
ptr
;
groupname
=
c
->
argv
[
i
+
1
]
->
ptr
;
consumername
=
c
->
argv
[
i
+
2
]
->
ptr
;
i
+=
2
;
}
else
{
addReply
(
c
,
shared
.
syntaxerr
);
...
...
@@ -1147,6 +1147,7 @@ void streamFreeCG(streamCG *cg) {
/* Lookup the consumer group in the specified stream and returns its
* pointer, otherwise if there is no such group, NULL is returned. */
streamCG
*
streamLookupCG
(
stream
*
s
,
sds
groupname
)
{
if
(
s
->
cgroups
==
NULL
)
return
NULL
;
streamCG
*
cg
=
raxFind
(
s
->
cgroups
,(
unsigned
char
*
)
groupname
,
sdslen
(
groupname
));
return
(
cg
==
raxNotFound
)
?
NULL
:
cg
;
...
...
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