summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-11-30 16:36:55 +0100
committerantirez <antirez@gmail.com>2018-12-21 11:42:51 +0100
commit99971796f630fae9e17a346a217b69fd8364944a (patch)
tree4d16f0992fea2eef12f204e31f903ed6cf383a2d
parente96c7937275f9673410b65fbd1392945d40e8abc (diff)
downloadredis-99971796f630fae9e17a346a217b69fd8364944a.tar.gz
RESP3: restore the concept of null array for RESP2 compat.
-rw-r--r--src/blocked.c2
-rw-r--r--src/geo.c4
-rw-r--r--src/multi.c2
-rw-r--r--src/sentinel.c2
-rw-r--r--src/server.h2
-rw-r--r--src/t_list.c2
-rw-r--r--src/t_zset.c2
7 files changed, 8 insertions, 8 deletions
diff --git a/src/blocked.c b/src/blocked.c
index 1f22a20a6..b8cf02c82 100644
--- a/src/blocked.c
+++ b/src/blocked.c
@@ -187,7 +187,7 @@ void replyToBlockedClientTimedOut(client *c) {
if (c->btype == BLOCKED_LIST ||
c->btype == BLOCKED_ZSET ||
c->btype == BLOCKED_STREAM) {
- addReplyNull(c);
+ addReplyNullArray(c);
} else if (c->btype == BLOCKED_WAIT) {
addReplyLongLong(c,replicationCountAcksByOffset(c->bpop.reploffset));
} else if (c->btype == BLOCKED_MODULE) {
diff --git a/src/geo.c b/src/geo.c
index d14f537bc..91a0421f5 100644
--- a/src/geo.c
+++ b/src/geo.c
@@ -763,12 +763,12 @@ void geoposCommand(client *c) {
for (j = 2; j < c->argc; j++) {
double score;
if (!zobj || zsetScore(zobj, c->argv[j]->ptr, &score) == C_ERR) {
- addReplyNull(c);
+ addReplyNullArray(c);
} else {
/* Decode... */
double xy[2];
if (!decodeGeohash(score,xy)) {
- addReplyNull(c);
+ addReplyNullArray(c);
continue;
}
addReplyArrayLen(c,2);
diff --git a/src/multi.c b/src/multi.c
index b84b75f74..71090d8ed 100644
--- a/src/multi.c
+++ b/src/multi.c
@@ -134,7 +134,7 @@ void execCommand(client *c) {
* in the second an EXECABORT error is returned. */
if (c->flags & (CLIENT_DIRTY_CAS|CLIENT_DIRTY_EXEC)) {
addReply(c, c->flags & CLIENT_DIRTY_EXEC ? shared.execaborterr :
- shared.null[c->resp]);
+ shared.nullarray[c->resp]);
discardTransaction(c);
goto handle_monitor;
}
diff --git a/src/sentinel.c b/src/sentinel.c
index a94159f68..536edcdd5 100644
--- a/src/sentinel.c
+++ b/src/sentinel.c
@@ -3078,7 +3078,7 @@ void sentinelCommand(client *c) {
if (c->argc != 3) goto numargserr;
ri = sentinelGetMasterByName(c->argv[2]->ptr);
if (ri == NULL) {
- addReplyNull(c);
+ addReplyNullArray(c);
} else {
sentinelAddr *addr = sentinelGetCurrentMasterAddress(ri);
diff --git a/src/server.h b/src/server.h
index c12dca596..0cc14f08c 100644
--- a/src/server.h
+++ b/src/server.h
@@ -782,7 +782,7 @@ struct moduleLoadQueueEntry {
struct sharedObjectsStruct {
robj *crlf, *ok, *err, *emptybulk, *czero, *cone, *pong, *space,
- *colon, *queued, *null[4], nullarray[4],
+ *colon, *queued, *null[4], *nullarray[4],
*emptyarray, *wrongtypeerr, *nokeyerr, *syntaxerr, *sameobjecterr,
*outofrangeerr, *noscripterr, *loadingerr, *slowscripterr, *bgsaveerr,
*masterdownerr, *roslaveerr, *execaborterr, *noautherr, *noreplicaserr,
diff --git a/src/t_list.c b/src/t_list.c
index d6daad691..451ffb4b5 100644
--- a/src/t_list.c
+++ b/src/t_list.c
@@ -731,7 +731,7 @@ void blockingPopGenericCommand(client *c, int where) {
/* If we are inside a MULTI/EXEC and the list is empty the only thing
* we can do is treating it as a timeout (even with timeout 0). */
if (c->flags & CLIENT_MULTI) {
- addReplyNull(c);
+ addReplyNullArray(c);
return;
}
diff --git a/src/t_zset.c b/src/t_zset.c
index 1c943caea..2efdcd260 100644
--- a/src/t_zset.c
+++ b/src/t_zset.c
@@ -3277,7 +3277,7 @@ void blockingGenericZpopCommand(client *c, int where) {
/* If we are inside a MULTI/EXEC and the zset is empty the only thing
* we can do is treating it as a timeout (even with timeout 0). */
if (c->flags & CLIENT_MULTI) {
- addReplyNull(c);
+ addReplyNullArray(c);
return;
}