Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
435e545d
Commit
435e545d
authored
Oct 31, 2010
by
Pieter Noordhuis
Browse files
Fix redisGetReply
parent
6042c569
Changes
1
Show whitespace changes
Inline
Side-by-side
hiredis.c
View file @
435e545d
...
...
@@ -800,15 +800,11 @@ int redisGetReply(redisContext *c, void **reply) {
void
*
aux
=
NULL
;
/* Try to read pending replies */
if
(
__redisGetReply
(
c
,
&
aux
)
==
REDIS_ERR
)
{
if
(
__redisGetReply
(
c
,
&
aux
)
==
REDIS_ERR
)
return
REDIS_ERR
;
}
else
{
/* Return immediately if there was a pending reply */
if
(
aux
!=
NULL
)
return
REDIS_OK
;
}
/* For the blocking context, flush output buffer and read reply */
if
(
c
->
flags
&
REDIS_BLOCK
)
{
if
(
aux
==
NULL
&&
c
->
flags
&
REDIS_BLOCK
)
{
/* Write until done */
do
{
if
(
redisBufferWrite
(
c
,
&
wdone
)
==
REDIS_ERR
)
...
...
@@ -822,10 +818,10 @@ int redisGetReply(redisContext *c, void **reply) {
if
(
__redisGetReply
(
c
,
&
aux
)
==
REDIS_ERR
)
return
REDIS_ERR
;
}
while
(
aux
==
NULL
);
}
/* Set reply object */
if
(
reply
!=
NULL
)
*
reply
=
aux
;
}
return
REDIS_OK
;
}
...
...
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