]> granicus.if.org Git - libevent/commitdiff
Make evbuffer_commit_space trigger callbacks.
authorNick Mathewson <nickm@torproject.org>
Mon, 13 Apr 2009 03:06:05 +0000 (03:06 +0000)
committerNick Mathewson <nickm@torproject.org>
Mon, 13 Apr 2009 03:06:05 +0000 (03:06 +0000)
svn:r1163

buffer.c

index 65b8b5f9f3ba4c8499d775883511070ce1f8afa5..9fc56cb142f30589eea5ab2098e4cff656a3aadd 100644 (file)
--- a/buffer.c
+++ b/buffer.c
@@ -476,8 +476,10 @@ evbuffer_commit_space(struct evbuffer *buf, size_t size)
 
        chain->off += size;
        buf->total_len += size;
+       buf->n_add_for_cb += size;
 
-        result = 0;
+       result = 0;
+       evbuffer_invoke_callbacks(buf);
 done:
         EVBUFFER_UNLOCK(buf, EVTHREAD_WRITE);
        return result;