summaryrefslogtreecommitdiff
path: root/async.c
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2011-04-21 15:01:58 +0200
committerPieter Noordhuis <pcnoordhuis@gmail.com>2011-04-21 15:04:42 +0200
commit6d207ea98ec6de086cb48c259fd3cac786f699ec (patch)
tree017f3a6379b0a37fb182a4fca6cde3ff294bd1b1 /async.c
parent58caf62a527173ffb861177037ace344db3caf19 (diff)
Create protocol reader when creating context
Diffstat (limited to 'async.c')
-rw-r--r--async.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/async.c b/async.c
index 76c4cc3..cf99677 100644
--- a/async.c
+++ b/async.c
@@ -136,11 +136,6 @@ redisAsyncContext *redisAsyncConnectUnix(const char *path) {
return ac;
}
-int redisAsyncSetReplyObjectFunctions(redisAsyncContext *ac, redisReplyObjectFunctions *fn) {
- redisContext *c = &(ac->c);
- return redisSetReplyObjectFunctions(c,fn);
-}
-
int redisAsyncSetConnectCallback(redisAsyncContext *ac, redisConnectCallback *fn) {
if (ac->onConnect == NULL) {
ac->onConnect = fn;
@@ -375,7 +370,7 @@ void redisProcessCallbacks(redisAsyncContext *ac) {
if (cb.fn != NULL) {
__redisRunCallback(ac,&cb,reply);
- c->fn->freeObject(reply);
+ c->reader->fn->freeObject(reply);
/* Proceed with free'ing when redisAsyncFree() was called. */
if (c->flags & REDIS_FREEING) {
@@ -387,7 +382,7 @@ void redisProcessCallbacks(redisAsyncContext *ac) {
* or there were no callbacks to begin with. Either way, don't
* abort with an error, but simply ignore it because the client
* doesn't know what the server will spit out over the wire. */
- c->fn->freeObject(reply);
+ c->reader->fn->freeObject(reply);
}
}