kc3-lang/libevent/buffer.c

Branch :


Log

Author Commit Date CI Message
e49e2891 2012-02-10 17:29:53 Update copyright notices to 2012
c986f232 2011-12-08 14:30:20 Fix behavior of evbuffer_peek(buf,-1,NULL,NULL,0) (Patch altered by nickm to not affect the behavior of evbuffer_peek(buf,-1,NULL,vec,n_vec).)
c37069cd 2011-11-02 16:09:15 Fix an evbuffer crash in evbuffer_remove_buffer() Found by Greg Hazel.
3c824bd3 2011-10-24 13:18:09 Update copyright dates to 2011.
0ba0af9c 2011-09-29 09:30:04 Prefer mmap to sendfile unless a DRAINS_TO_FD flag is set. Allows add_file to work with SSL. The sendfile() implementation for evbuffer_add_file is potentially more efficient, but it has a problem: you can only use it to send bytes over a socket using sendfile(). If you are writing bytes via SSL_send() or via a filter, or if you need to be able to inspect your buffer, it doesn't work. As an easy fix, this patch disables the sendfile-based implementation of evbuffer_add_file on an evbuffer unless the user sets a new EVBUFFER_FLAG_DRAINS_TO_FD flag on that evbuffer, indicating that the evbuffer will not be inspected, but only written out via evbuffer_write(), evbuffer_write_atmost(), or drained with stuff like evbuffer_drain() or evbuffer_add_buffer(). This flag is off by default, except for evbuffers used for output on bufferevent_socket. In the future, it could be interesting to make a best-effort file segment implementation that tries to send via sendfile, but mmaps on demand. That's too much complexity for a stable release series, though.
1ef1f684 2011-09-28 09:22:17 Make evbuffer callbacks get the right n_added value after evbuffer_add Patch from Alex.
6acfbdd8 2011-08-18 12:35:27 Make overlapped reads result in evbuffer callbacks getting invoked
643922e9 2011-08-15 13:39:10 Solaris sendfile: correctly detect amount of data sent Original message: Solaris sendfile seems to fail when sending moderately large (<1GB) files. Not a 32/64 problem, but a buffer problem. Anyone else ever try this? It is definitely broken in http-server.c. It seems to be broken in the following way: When sendfile sends partial data (EAGAIN, would block), "res" is always -1, rather than the amount sent. Here's a patch that reads from the "offset" pointer instead to discover what was sent. This seems to work:
f87f5689 2011-07-04 11:47:24 Speed up invoke_callbacks on evbuffers when there are no callbacks This fixes a performance regression against 1.4
4461f1a0 2011-06-06 15:11:28 Fix incorrect results from evbuffer_search_eol(EOL_LF) Our evbuffer_strchr() function [which was only used for search_eol(EOL_LF) could give incorrect results if it found its answer in the first chunk but didn't start searching from the front of the chunk. Also, this patch adds unit tests for evbuffer_search_eol, particularly in those cases that evbuffer_readln() tests didn't exercise.