summaryrefslogtreecommitdiff
path: root/evbuffer-internal.h
diff options
context:
space:
mode:
authorNiels Provos <provos@gmail.com>2008-03-31 02:04:34 +0000
committerNiels Provos <provos@gmail.com>2008-03-31 02:04:34 +0000
commit193c06a7ed9730f5f08ca3958fbacee2c3e28e36 (patch)
tree9391a2cc805af2600e6482f4d365ef7f56e93b00 /evbuffer-internal.h
parent3ef1f5041596672affcfe8af01d6d73eb86865de (diff)
downloadlibevent-193c06a7ed9730f5f08ca3958fbacee2c3e28e36.tar.gz
fix a bug in which evbuffer_add_vfprintf would loop forever; avoid
fragmentation in evbuffer_expand by increasing the size of the last buffer in the chain; as a result with have to keep track of the previous_to_last chain; provide a evbuffer_validate() function in the regression test to make sure that all evbuffer are internally consistent. svn:r699
Diffstat (limited to 'evbuffer-internal.h')
-rw-r--r--evbuffer-internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/evbuffer-internal.h b/evbuffer-internal.h
index 5df1b1a2..0f14d990 100644
--- a/evbuffer-internal.h
+++ b/evbuffer-internal.h
@@ -45,6 +45,7 @@ struct evbuffer_chain;
struct evbuffer {
struct evbuffer_chain *first;
struct evbuffer_chain *last;
+ struct evbuffer_chain *previous_to_last;
size_t total_len; /* total length of all buffers */