diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-12-01 16:43:21 +0100 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-12-01 16:43:24 +0100 |
commit | af7369a253247e23f699a0d803f68b3ade022044 (patch) | |
tree | af3aae5b9667cd9b1008f3cd2d6c4389c561aa5e /adapters/libevent.h | |
parent | 9af1574d6e65bac7b39e7036056cb326064f1ac4 (diff) |
Use extra field for adapter-specific data
This makes sure that the "data" field on the asynchronous context can be
used for user-specific data.
Diffstat (limited to 'adapters/libevent.h')
-rw-r--r-- | adapters/libevent.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/adapters/libevent.h b/adapters/libevent.h index 8531c52..dc1f5c7 100644 --- a/adapters/libevent.h +++ b/adapters/libevent.h @@ -52,7 +52,7 @@ int redisLibeventAttach(redisAsyncContext *ac, struct event_base *base) { redisLibeventEvents *e; /* Nothing should be attached when something is already attached */ - if (ac->data != NULL) + if (ac->_adapter_data != NULL) return REDIS_ERR; /* Create container for context and r/w events */ @@ -65,7 +65,7 @@ int redisLibeventAttach(redisAsyncContext *ac, struct event_base *base) { ac->evAddWrite = redisLibeventAddWrite; ac->evDelWrite = redisLibeventDelWrite; ac->evCleanup = redisLibeventCleanup; - ac->data = e; + ac->_adapter_data = e; /* Initialize and install read/write events */ event_set(&e->rev,c->fd,EV_READ,redisLibeventReadEvent,e); |