mirror of
https://github.com/fluencelabs/redis
synced 2025-03-31 14:51:04 +00: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) {
|
static int cliReadMultiBulkReply(int fd) {
|
||||||
sds replylen = cliReadLine(fd);
|
sds replylen = cliReadLine(fd);
|
||||||
int elements, c = 1;
|
int elements, c = 1;
|
||||||
|
int retval = 0;
|
||||||
|
|
||||||
if (replylen == NULL) return 1;
|
if (replylen == NULL) return 1;
|
||||||
elements = atoi(replylen);
|
elements = atoi(replylen);
|
||||||
@ -182,10 +183,10 @@ static int cliReadMultiBulkReply(int fd) {
|
|||||||
}
|
}
|
||||||
while(elements--) {
|
while(elements--) {
|
||||||
printf("%d. ", c);
|
printf("%d. ", c);
|
||||||
if (cliReadReply(fd)) return 1;
|
if (cliReadReply(fd)) retval = 1;
|
||||||
c++;
|
c++;
|
||||||
}
|
}
|
||||||
return 0;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cliReadReply(int fd) {
|
static int cliReadReply(int fd) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user