diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-04-03 14:27:03 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-04-03 14:27:03 +0000 |
commit | f1b1bad415332f6d49a59eb40004ca1d7946c4da (patch) | |
tree | ed1e92ad59d1cac9b166f4a1b908f9d7c5c57ef0 /bufferevent_filter.c | |
parent | f90500a5df9af60502215d640ccbf2ba031d30e0 (diff) | |
download | libevent-f1b1bad415332f6d49a59eb40004ca1d7946c4da.tar.gz |
Make the new evbuffer callbacks use a new struct-based interface.
The old interface would fail pretty hard when we had to batch up
multiple adds and drains in a single call.
svn:r1131
Diffstat (limited to 'bufferevent_filter.c')
-rw-r--r-- | bufferevent_filter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bufferevent_filter.c b/bufferevent_filter.c index fd0f236f..ed3e4122 100644 --- a/bufferevent_filter.c +++ b/bufferevent_filter.c @@ -73,7 +73,7 @@ static int be_filter_flush(struct bufferevent *bufev, short iotype, enum bufferevent_flush_mode mode); static void bufferevent_filtered_outbuf_cb(struct evbuffer *buf, - size_t old, size_t now, void *arg); + const struct evbuffer_cb_info *info, void *arg); struct bufferevent_filtered { struct bufferevent bev; @@ -354,11 +354,11 @@ be_filter_process_output(struct bufferevent_filtered *bevf, /* Called when the size of our outbuf changes. */ static void bufferevent_filtered_outbuf_cb(struct evbuffer *buf, - size_t old, size_t now, void *arg) + const struct evbuffer_cb_info *cbinfo, void *arg) { struct bufferevent_filtered *bevf = arg; - if (now > old) { + if (cbinfo->n_added) { int processed_any = 0; /* Somebody added more data to the output buffer. Try to * process it, if we should. */ |