|
17da042d
|
2010-03-11T15:39:44
|
|
Add some glass-box tests for the last_with_data code.
|
|
6f47bd12
|
2010-03-10T23:28:51
|
|
Remove previous_to_last from evbuffer
|
|
c8ac57f1
|
2010-03-10T23:24:14
|
|
Use last_with_data in place of previous_to_last
This actually makes some of the code a lot simpler. The only
ones that actually used previous_to_last for anything were reserving
and committing space.
|
|
2a6d2a1e
|
2010-03-10T22:16:14
|
|
Revise evbuffer to add last_with_data
This is the first patch in a series to replace previous_to_last with
last_with_data. Currently, we can only use two partially empty chains
at the end of an evbuffer, so if we have one with 511 bytes free, and
another with 512 bytes free, and we try to do a 1024 byte read, we
can't just stick another chain on the end: we need to reallocate the
last one. That's stupid and inefficient.
Instead, this patch adds a last_with_data pointer to eventually
replace previous_to_last. Instead of pointing to the penultimated
chain (if any) as previous_to_last does, last_with_data points to the
last chain that has any data in it, if any. If all chains are empty,
last_with_data points to the first chain. If there are no chains,
last_with_data is NULL.
The next step is to start using last_with_data everywhere that we
currently use previous_to_last. When that's done, we can remove
previous_to_last and the code that maintains it.
|
|
17efc1cd
|
2010-03-04T01:25:51
|
|
Update all our copyright notices to say "2010"
|
|
e5bbd40a
|
2010-02-18T17:41:15
|
|
Clean up formatting: use tabs, not 8-spaces, to indent.
|
|
9bf124bf
|
2009-11-18T21:16:47
|
|
Build correctly with mm replacement turned off.
svn:r1547
|
|
784b8773
|
2009-11-06T21:46:57
|
|
We do not work any more without an event-config.h; stop pretending that it is meaningful to check for HAVE_CONFIG_H
svn:r1516
|
|
ac633aeb
|
2009-11-05T21:22:23
|
|
Fix some build warnings on MSVC, mostly related to signed/unsigned comparisons.
svn:r1510
|
|
ed0e91e0
|
2009-10-27T04:03:50
|
|
New test flag to suppress logging for one test.
svn:r1466
|
|
8e8d94a3
|
2009-09-24T22:18:19
|
|
Do not drop data from evbuffer when out of memory; reported by Jacek Masiulaniec
svn:r1436
|
|
8a99083f
|
2009-08-07T17:16:52
|
|
Add an evbuffer_search_range() to search a bounded range of a buffer
This can be handy when you have one search to find the end of a header
section, and then you want to find a substring within the header
section without looking at the body.
svn:r1410
|
|
6dc488bd
|
2009-07-31T17:34:18
|
|
Improved coverage for evbuffer_readln()
svn:r1402
|
|
043515bc
|
2009-07-14T18:50:06
|
|
Stop using C++ style comments.
svn:r1343
|
|
23243b8a
|
2009-05-19T21:39:35
|
|
Replace reserve/commit with new iovec-based interface. Add a new evbuffer_peek.
svn:r1296
|
|
dc4c7b95
|
2009-05-15T22:44:18
|
|
Change the interface of evbuffer_add_reference: give the cleanup function more info.
svn:r1294
|
|
bba69e03
|
2009-05-15T20:23:59
|
|
New semantics for evbuffer_cb_set_flags().
Previously, set_flags() would replace all previous user-visible flags.
Now it just sets the flags, and there is a clear_flags() function to
clear other flags.
svn:r1293
|
|
a8f6d961
|
2009-04-17T06:56:09
|
|
Actually stop using EVBUFFER_LENGTH/DATA, and move them to buffer_compat.h
svn:r1183
|
|
4e8cdc6f
|
2009-04-13T18:23:02
|
|
Fix two windows compilation bugs.
svn:r1171
|
|
747331d1
|
2009-04-08T03:04:39
|
|
Add freeze support to evbuffers.
From the documentation:
Prevent calls that modify an evbuffer from succeeding. A buffer may
frozen at the front, at the back, or at both the front and the back.
If the front of a buffer is frozen, operations that drain data from
the front of the buffer, or that prepend data to the buffer, will
fail until it is unfrozen. If the back a buffer is frozen, operations
that append data from the buffer will fail until it is unfrozen.
We'll use this to ensure correctness on an evbuffer when we're waiting
for an overlapped IO call to finish.
svn:r1143
|
|
f1b1bad4
|
2009-04-03T14:27:03
|
|
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
|
|
f90500a5
|
2009-04-03T01:21:36
|
|
Add a new improved search function.
The old evbuffer_find didn't allow iterative searching, and forced us
to repack the buffer completely every time we searched in it. The
new evbuffer_search addresses both of these. As a side-effect, the
evbuffer_find implementation is now a little more efficient.
svn:r1130
|
|
79b7799b
|
2009-02-13T01:42:59
|
|
a simple test for evbuffer_add_file
svn:r1122
|
|
e7fd1034
|
2009-02-10T19:39:03
|
|
Test some formerly untested prepend cases of evbuffer. Now evbuffer coverage is over 80 percent.
svn:r1108
|
|
9e3e7b36
|
2009-02-10T19:38:54
|
|
More unit tests for evbuffer_add_reference to make sure that certain interleaved data patterns work; that free invokes callback; that callbacks are not invoked too early or later; etc.
svn:r1107
|
|
8d3a10f8
|
2009-02-01T01:43:58
|
|
Support temporarily suspending an evbuffer callback. This is different from disabling the callback, since we want to process changes, but not just yet.
svn:r1091
|
|
e3e11531
|
2009-02-01T01:07:42
|
|
Unit tests for evbuffer callback manipulation
svn:r1090
|
|
ca37fef9
|
2009-02-01T01:07:22
|
|
Change evbuffer callbacks to use tinytest natively and never assert.
svn:r1088
|
|
a30c9eb1
|
2009-02-01T01:07:12
|
|
Move evbuffer tests into their own file.
svn:r1087
|