summaryrefslogtreecommitdiff
path: root/src/pubsub.c
diff options
context:
space:
mode:
authorMatt Stancliff <matt@genges.com>2014-08-01 13:57:30 -0400
committerantirez <antirez@gmail.com>2014-08-08 11:19:37 +0200
commit25791550e085930c196b9234465f6538fe8ee383 (patch)
tree12e9a24256f32a9ab223755fb659c749fdc3cd87 /src/pubsub.c
parent4bb6844e4354738b1fc7400be016277e22fa585b (diff)
downloadredis-25791550e085930c196b9234465f6538fe8ee383.tar.gz
pubsub: Return integers for NUMSUB, not strings
Also adds test for numsub — due to tcl being tcl, it doesn't capture the "numberness" of the fix, but now we at least have one test case for numsub. Closes #1561
Diffstat (limited to 'src/pubsub.c')
-rw-r--r--src/pubsub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pubsub.c b/src/pubsub.c
index 720cd5185..d6cfbdf3c 100644
--- a/src/pubsub.c
+++ b/src/pubsub.c
@@ -358,7 +358,7 @@ void pubsubCommand(redisClient *c) {
list *l = dictFetchValue(server.pubsub_channels,c->argv[j]);
addReplyBulk(c,c->argv[j]);
- addReplyBulkLongLong(c,l ? listLength(l) : 0);
+ addReplyLongLong(c,l ? listLength(l) : 0);
}
} else if (!strcasecmp(c->argv[1]->ptr,"numpat") && c->argc == 2) {
/* PUBSUB NUMPAT */