summaryrefslogtreecommitdiff
path: root/src/networking.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/networking.c')
-rw-r--r--src/networking.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/networking.c b/src/networking.c
index 5e442e289..789ea822d 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -611,6 +611,14 @@ void addReplyNull(client *c) {
}
}
+void addReplyBool(client *c, int b) {
+ if (c->resp == 3) {
+ addReply(c, b ? shared.cone : shared.czero);
+ } else {
+ addReplyString(c, b ? "#t\r\n" : "#f\r\n",4);
+ }
+}
+
/* A null array is a concept that no longer exists in RESP3. However
* RESP2 had it, so API-wise we have this call, that will emit the correct
* RESP2 protocol, however for RESP3 the reply will always be just the