mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
Merge pull request #5136 from 0xtonyxia/fix-xread-id-parse
Fix xreadgroup with '$' ID.
This commit is contained in:
commit
4bff45c7a6
@ -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) {
|
|||||||
}
|
}
|
||||||
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.");
|
||||||
|
Loading…
Reference in New Issue
Block a user