summaryrefslogtreecommitdiff
path: root/bufferevent_filter.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-04-03 14:27:03 +0000
committerNick Mathewson <nickm@torproject.org>2009-04-03 14:27:03 +0000
commitf1b1bad415332f6d49a59eb40004ca1d7946c4da (patch)
treeed1e92ad59d1cac9b166f4a1b908f9d7c5c57ef0 /bufferevent_filter.c
parentf90500a5df9af60502215d640ccbf2ba031d30e0 (diff)
downloadlibevent-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.c6
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. */