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
59bd44d1
Commit
59bd44d1
authored
Nov 09, 2010
by
Damian Janowski & Michel Martens
Committed by
Michel Martens
Nov 29, 2010
Browse files
Remove warning.
parent
7c25a43a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_list.c
View file @
59bd44d1
...
...
@@ -818,6 +818,24 @@ int handleClientsWaitingListPush(redisClient *c, robj *key, robj *ele) {
return
1
;
}
int
checkTimeout
(
redisClient
*
c
,
robj
*
object
,
time_t
*
timeout
)
{
long
long
lltimeout
;
if
(
getLongLongFromObject
(
object
,
&
lltimeout
)
!=
REDIS_OK
)
{
addReplyError
(
c
,
"timeout is not an integer"
);
return
REDIS_ERR
;
}
if
(
lltimeout
<
0
)
{
addReplyError
(
c
,
"timeout is negative"
);
return
REDIS_ERR
;
}
*
timeout
=
lltimeout
;
return
REDIS_OK
;
}
/* Blocking RPOP/LPOP */
void
blockingPopGenericCommand
(
redisClient
*
c
,
int
where
)
{
robj
*
o
;
...
...
@@ -881,24 +899,6 @@ void blockingPopGenericCommand(redisClient *c, int where) {
blockForKeys
(
c
,
c
->
argv
+
1
,
c
->
argc
-
2
,
timeout
,
NULL
);
}
int
checkTimeout
(
redisClient
*
c
,
robj
*
object
,
time_t
*
timeout
)
{
long
long
lltimeout
;
if
(
getLongLongFromObject
(
object
,
&
lltimeout
)
!=
REDIS_OK
)
{
addReplyError
(
c
,
"timeout is not an integer"
);
return
REDIS_ERR
;
}
if
(
lltimeout
<
0
)
{
addReplyError
(
c
,
"timeout is negative"
);
return
REDIS_ERR
;
}
*
timeout
=
lltimeout
;
return
REDIS_OK
;
}
void
blpopCommand
(
redisClient
*
c
)
{
blockingPopGenericCommand
(
c
,
REDIS_HEAD
);
}
...
...
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