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
edba65d0
Commit
edba65d0
authored
Feb 28, 2012
by
antirez
Browse files
Var renamed into pushGenericCommand() to better reflect what it means.
parent
ad08d059
Changes
1
Show whitespace changes
Inline
Side-by-side
src/t_list.c
View file @
edba65d0
...
@@ -259,7 +259,7 @@ void listTypeConvert(robj *subject, int enc) {
...
@@ -259,7 +259,7 @@ void listTypeConvert(robj *subject, int enc) {
*----------------------------------------------------------------------------*/
*----------------------------------------------------------------------------*/
void
pushGenericCommand
(
redisClient
*
c
,
int
where
)
{
void
pushGenericCommand
(
redisClient
*
c
,
int
where
)
{
int
j
,
addlen
=
0
,
pushed
=
0
;
int
j
,
waiting
=
0
,
pushed
=
0
;
robj
*
lobj
=
lookupKeyWrite
(
c
->
db
,
c
->
argv
[
1
]);
robj
*
lobj
=
lookupKeyWrite
(
c
->
db
,
c
->
argv
[
1
]);
int
may_have_waiting_clients
=
(
lobj
==
NULL
);
int
may_have_waiting_clients
=
(
lobj
==
NULL
);
...
@@ -272,7 +272,7 @@ void pushGenericCommand(redisClient *c, int where) {
...
@@ -272,7 +272,7 @@ void pushGenericCommand(redisClient *c, int where) {
c
->
argv
[
j
]
=
tryObjectEncoding
(
c
->
argv
[
j
]);
c
->
argv
[
j
]
=
tryObjectEncoding
(
c
->
argv
[
j
]);
if
(
may_have_waiting_clients
)
{
if
(
may_have_waiting_clients
)
{
if
(
handleClientsWaitingListPush
(
c
,
c
->
argv
[
1
],
c
->
argv
[
j
]))
{
if
(
handleClientsWaitingListPush
(
c
,
c
->
argv
[
1
],
c
->
argv
[
j
]))
{
addlen
++
;
waiting
++
;
continue
;
continue
;
}
else
{
}
else
{
may_have_waiting_clients
=
0
;
may_have_waiting_clients
=
0
;
...
@@ -285,7 +285,7 @@ void pushGenericCommand(redisClient *c, int where) {
...
@@ -285,7 +285,7 @@ void pushGenericCommand(redisClient *c, int where) {
listTypePush
(
lobj
,
c
->
argv
[
j
],
where
);
listTypePush
(
lobj
,
c
->
argv
[
j
],
where
);
pushed
++
;
pushed
++
;
}
}
addReplyLongLong
(
c
,
addlen
+
(
lobj
?
listTypeLength
(
lobj
)
:
0
));
addReplyLongLong
(
c
,
waiting
+
(
lobj
?
listTypeLength
(
lobj
)
:
0
));
if
(
pushed
)
signalModifiedKey
(
c
->
db
,
c
->
argv
[
1
]);
if
(
pushed
)
signalModifiedKey
(
c
->
db
,
c
->
argv
[
1
]);
server
.
dirty
+=
pushed
;
server
.
dirty
+=
pushed
;
}
}
...
...
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