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
2446fbb3
Commit
2446fbb3
authored
Feb 07, 2011
by
antirez
Browse files
Merge remote branch 'pietern/2.2-brpoplpush' into 2.2
parents
970e813b
bbaf76ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_list.c
View file @
2446fbb3
...
@@ -826,7 +826,7 @@ int handleClientsWaitingListPush(redisClient *c, robj *key, robj *ele) {
...
@@ -826,7 +826,7 @@ int handleClientsWaitingListPush(redisClient *c, robj *key, robj *ele) {
addReplyBulk
(
receiver
,
ele
);
addReplyBulk
(
receiver
,
ele
);
return
1
;
return
1
;
}
else
{
}
else
{
/* BRPOPLPUSH */
/* BRPOPLPUSH
, note that receiver->db is always equal to c->db.
*/
dstobj
=
lookupKeyWrite
(
receiver
->
db
,
dstkey
);
dstobj
=
lookupKeyWrite
(
receiver
->
db
,
dstkey
);
if
(
dstobj
&&
checkType
(
receiver
,
dstobj
,
REDIS_LIST
))
{
if
(
dstobj
&&
checkType
(
receiver
,
dstobj
,
REDIS_LIST
))
{
decrRefCount
(
dstkey
);
decrRefCount
(
dstkey
);
...
@@ -941,7 +941,7 @@ void brpoplpushCommand(redisClient *c) {
...
@@ -941,7 +941,7 @@ void brpoplpushCommand(redisClient *c) {
/* Blocking against an empty list in a multi state
/* Blocking against an empty list in a multi state
* returns immediately. */
* returns immediately. */
addReply
(
c
,
shared
.
null
multi
bulk
);
addReply
(
c
,
shared
.
nullbulk
);
}
else
{
}
else
{
/* The list is empty and the client blocks. */
/* The list is empty and the client blocks. */
blockForKeys
(
c
,
c
->
argv
+
1
,
1
,
timeout
,
c
->
argv
[
2
]);
blockForKeys
(
c
,
c
->
argv
+
1
,
1
,
timeout
,
c
->
argv
[
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