]> git.saurik.com Git - redis.git/commitdiff
Issue 179 fixed, now redis-cli is able to parse correctly multi bulk replies with...
authorantirez <antirez@gmail.com>
Tue, 24 Aug 2010 16:08:09 +0000 (18:08 +0200)
committerantirez <antirez@gmail.com>
Tue, 24 Aug 2010 16:08:09 +0000 (18:08 +0200)
src/redis-cli.c

index b4a108904962578f7f6c40decb971feec223c858..007ebcdeed09ec76f099971d8bc1dc49f9958695 100644 (file)
@@ -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) {