Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
519c9e11
Commit
519c9e11
authored
Jun 20, 2013
by
antirez
Browse files
Allow PUBSUB NUMSUB without channels.
The result is an empty list but it is handy to call it programmatically.
parent
455563fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pubsub.c
View file @
519c9e11
...
...
@@ -336,8 +336,8 @@ void pubsubCommand(redisClient *c) {
}
dictReleaseIterator
(
di
);
setDeferredMultiBulkLength
(
c
,
replylen
,
mblen
);
}
else
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"numsub"
)
&&
c
->
argc
>
2
)
{
/* PUBSUB NUMSUB Channel_1
[
... Channel_N] */
}
else
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"numsub"
)
&&
c
->
argc
>
=
2
)
{
/* PUBSUB NUMSUB
[
Channel_1 ... Channel_N] */
int
j
;
addReplyMultiBulkLen
(
c
,(
c
->
argc
-
2
)
*
2
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment