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/ae.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/ae.h')
-rw-r--r-- | adapters/ae.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/adapters/ae.h b/adapters/ae.h index 8d0b526..b8b2228 100644 --- a/adapters/ae.h +++ b/adapters/ae.h @@ -72,7 +72,7 @@ int redisAeAttach(aeEventLoop *loop, redisAsyncContext *ac) { redisAeEvents *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 */ @@ -88,7 +88,7 @@ int redisAeAttach(aeEventLoop *loop, redisAsyncContext *ac) { ac->evAddWrite = redisAeAddWrite; ac->evDelWrite = redisAeDelWrite; ac->evCleanup = redisAeCleanup; - ac->data = e; + ac->_adapter_data = e; return REDIS_OK; } |