提交 b37ca6ed 编写于 作者: A antirez

Issue 179 fixed, now redis-cli is able to parse correctly multi bulk replies...

Issue 179 fixed, now redis-cli is able to parse correctly multi bulk replies with elements that are errors
上级 695fe874
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册