diff options
author | antirez <antirez@gmail.com> | 2018-12-10 12:35:28 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2018-12-21 11:42:52 +0100 |
commit | 5b298a2a6db08552ab079c8095eb27c43bf62ea1 (patch) | |
tree | d0b7c4fff037220ae7ee3ab41f142ece5995d39d | |
parent | b1f4203afddca8c70557e3e71073f2c75f02fb6f (diff) | |
download | redis-5b298a2a6db08552ab079c8095eb27c43bf62ea1.tar.gz |
RESP3: Fix addReplyBool() RESP2/3 output.
-rw-r--r-- | src/debug.c | 5 | ||||
-rw-r--r-- | src/networking.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/debug.c b/src/debug.c index d43dcc97a..9029871ea 100644 --- a/src/debug.c +++ b/src/debug.c @@ -551,7 +551,10 @@ NULL for (int j = 0; j < 3; j++) addReplyLongLong(c,j); } else if (!strcasecmp(name,"map")) { addReplyMapLen(c,3); - for (int j = 0; j < 3; j++) addReplyLongLong(c,j); + for (int j = 0; j < 3; j++) { + addReplyLongLong(c,j); + addReplyBool(c, j == 1); + } } else if (!strcasecmp(name,"attrib")) { addReplyAttributeLen(c,1); addReplyBulkCString(c,"key-popularity"); diff --git a/src/networking.c b/src/networking.c index 789ea822d..75312a1f2 100644 --- a/src/networking.c +++ b/src/networking.c @@ -612,7 +612,7 @@ void addReplyNull(client *c) { } void addReplyBool(client *c, int b) { - if (c->resp == 3) { + if (c->resp == 2) { addReply(c, b ? shared.cone : shared.czero); } else { addReplyString(c, b ? "#t\r\n" : "#f\r\n",4); |