From 1ef1f68462cb5509d978ae490efeff0c73569f25 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 28 Sep 2011 09:22:17 -0400 Subject: [PATCH] Make evbuffer callbacks get the right n_added value after evbuffer_add Patch from Alex. --- buffer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/buffer.c b/buffer.c index 98f5a0b2..146bbdf4 100644 --- a/buffer.c +++ b/buffer.c @@ -1557,6 +1557,7 @@ evbuffer_add(struct evbuffer *buf, const void *data_in, size_t datlen) memcpy(tmp->buffer, data, datlen); tmp->off = datlen; evbuffer_chain_insert(buf, tmp); + buf->n_add_for_cb += datlen; out: evbuffer_invoke_callbacks(buf); -- 2.40.0