summaryrefslogtreecommitdiff
path: root/bufferevent_async.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-03-13 01:06:57 -0500
committerNick Mathewson <nickm@torproject.org>2010-03-13 01:06:57 -0500
commit657d1b6d3f0f27484d368bca39f99c2c5da107b6 (patch)
tree2ea47c49a77fe0abf326778fd31b39ebb5f04f21 /bufferevent_async.c
parent0cf1431e5d85411ac8174ffe3b802c6a37f6e3a8 (diff)
downloadlibevent-657d1b6d3f0f27484d368bca39f99c2c5da107b6.tar.gz
Set mem_offset for every bufferevent type
Diffstat (limited to 'bufferevent_async.c')
-rw-r--r--bufferevent_async.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/bufferevent_async.c b/bufferevent_async.c
index 024c97e4..480f44a7 100644
--- a/bufferevent_async.c
+++ b/bufferevent_async.c
@@ -66,17 +66,6 @@ static void be_async_destruct(struct bufferevent *);
static int be_async_flush(struct bufferevent *, short, enum bufferevent_flush_mode);
static int be_async_ctrl(struct bufferevent *, enum bufferevent_ctrl_op, union bufferevent_ctrl_data *);
-const struct bufferevent_ops bufferevent_ops_async = {
- "socket_async",
- 0,
- be_async_enable,
- be_async_disable,
- be_async_destruct,
- _bufferevent_generic_adj_timeouts,
- be_async_flush,
- be_async_ctrl,
-};
-
struct bufferevent_async {
struct bufferevent_private bev;
struct event_overlapped connect_overlapped;
@@ -87,6 +76,17 @@ struct bufferevent_async {
unsigned ok : 1;
};
+const struct bufferevent_ops bufferevent_ops_async = {
+ "socket_async",
+ evutil_offsetof(struct bufferevent_async, bev.bev),
+ be_async_enable,
+ be_async_disable,
+ be_async_destruct,
+ _bufferevent_generic_adj_timeouts,
+ be_async_flush,
+ be_async_ctrl,
+};
+
static inline struct bufferevent_async *
upcast(struct bufferevent *bev)
{