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
hiredis
Commits
30a9f8f2
Commit
30a9f8f2
authored
Nov 01, 2010
by
Pieter Noordhuis
Browse files
Use existing function to append to the output buffer
parent
ef995acc
Changes
1
Hide whitespace changes
Inline
Side-by-side
async.c
View file @
30a9f8f2
...
...
@@ -33,6 +33,9 @@
#include "sds.h"
#include "util.h"
/* Forward declaration of function in hiredis.c */
void
__redisAppendCommand
(
redisContext
*
c
,
char
*
cmd
,
size_t
len
);
static
redisAsyncContext
*
redisAsyncInitialize
(
redisContext
*
c
)
{
redisAsyncContext
*
ac
=
realloc
(
c
,
sizeof
(
redisAsyncContext
));
/* Set all bytes in the async part of the context to 0 */
...
...
@@ -231,7 +234,7 @@ static int __redisAsyncCommand(redisAsyncContext *ac, redisCallbackFn *fn, void
/* Don't accept new commands when the connection is lazily closed. */
if
(
c
->
flags
&
REDIS_DISCONNECTING
)
return
REDIS_ERR
;
c
->
obuf
=
sdscatlen
(
c
->
obuf
,
cmd
,
len
);
__redisAppendCommand
(
c
,
cmd
,
len
);
/* Store callback */
cb
.
fn
=
fn
;
...
...
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