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
b028dda3
Commit
b028dda3
authored
Nov 01, 2010
by
Pieter Noordhuis
Browse files
Return from getCallback if there is no reply
parent
e16340f2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
b028dda3
...
@@ -58,10 +58,10 @@ dynamic: ${DYLIBNAME}
...
@@ -58,10 +58,10 @@ dynamic: ${DYLIBNAME}
static
:
${STLIBNAME}
static
:
${STLIBNAME}
# Binaries:
# Binaries:
hiredis-example-libevent
:
${DYLIBNAME}
hiredis-example-libevent
:
example-libevent.o
${DYLIBNAME}
$(CC)
-o
$@
$(CCOPT)
$(DEBUG)
-L
.
-lhiredis
-levent
-Wl
,-rpath,. example-libevent.c
$(CC)
-o
$@
$(CCOPT)
$(DEBUG)
-L
.
-lhiredis
-levent
-Wl
,-rpath,. example-libevent.c
hiredis-example-libev
:
${DYLIBNAME}
hiredis-example-libev
:
example-libev.o
${DYLIBNAME}
$(CC)
-o
$@
$(CCOPT)
$(DEBUG)
-L
.
-lhiredis
-lev
-Wl
,-rpath,. example-libev.c
$(CC)
-o
$@
$(CCOPT)
$(DEBUG)
-L
.
-lhiredis
-lev
-Wl
,-rpath,. example-libev.c
hiredis-%
:
%.o ${DYLIBNAME}
hiredis-%
:
%.o ${DYLIBNAME}
...
...
example-libev.c
View file @
b028dda3
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
#include "adapters/libev.h"
#include "adapters/libev.h"
void
getCallback
(
redisAsyncContext
*
c
,
redisReply
*
reply
,
void
*
privdata
)
{
void
getCallback
(
redisAsyncContext
*
c
,
redisReply
*
reply
,
void
*
privdata
)
{
if
(
reply
==
NULL
)
return
;
printf
(
"argv[%s]: %s
\n
"
,
(
char
*
)
privdata
,
reply
->
str
);
printf
(
"argv[%s]: %s
\n
"
,
(
char
*
)
privdata
,
reply
->
str
);
/* Disconnect after receiving the reply to GET */
/* Disconnect after receiving the reply to GET */
...
...
example-libevent.c
View file @
b028dda3
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
#include "adapters/libevent.h"
#include "adapters/libevent.h"
void
getCallback
(
redisAsyncContext
*
c
,
redisReply
*
reply
,
void
*
privdata
)
{
void
getCallback
(
redisAsyncContext
*
c
,
redisReply
*
reply
,
void
*
privdata
)
{
if
(
reply
==
NULL
)
return
;
printf
(
"argv[%s]: %s
\n
"
,
(
char
*
)
privdata
,
reply
->
str
);
printf
(
"argv[%s]: %s
\n
"
,
(
char
*
)
privdata
,
reply
->
str
);
/* Disconnect after receiving the reply to GET */
/* Disconnect after receiving the reply to GET */
...
...
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