diff options
author | Niels Provos <provos@gmail.com> | 2008-03-31 02:04:34 +0000 |
---|---|---|
committer | Niels Provos <provos@gmail.com> | 2008-03-31 02:04:34 +0000 |
commit | 193c06a7ed9730f5f08ca3958fbacee2c3e28e36 (patch) | |
tree | 9391a2cc805af2600e6482f4d365ef7f56e93b00 /evbuffer-internal.h | |
parent | 3ef1f5041596672affcfe8af01d6d73eb86865de (diff) | |
download | libevent-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.h | 1 |
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 */ |