mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 08:08:53 -05:00
Issue 179 fixed, now redis-cli is able to parse correctly multi bulk replies with elements that are errors
This commit is contained in:
parent
695fe87456
commit
b37ca6edb1
@ -169,6 +169,7 @@ static int cliReadBulkReply(int fd) {
|
||||
static int cliReadMultiBulkReply(int fd) {
|
||||
sds replylen = cliReadLine(fd);
|
||||
int elements, c = 1;
|
||||
int retval = 0;
|
||||
|
||||
if (replylen == NULL) return 1;
|
||||
elements = atoi(replylen);
|
||||
@ -182,10 +183,10 @@ static int cliReadMultiBulkReply(int fd) {
|
||||
}
|
||||
while(elements--) {
|
||||
printf("%d. ", c);
|
||||
if (cliReadReply(fd)) return 1;
|
||||
if (cliReadReply(fd)) retval = 1;
|
||||
c++;
|
||||
}
|
||||
return 0;
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int cliReadReply(int fd) {
|
||||
|
Loading…
Reference in New Issue
Block a user