]> granicus.if.org Git - libevent/log
libevent
13 years agoUse getifaddrs to detect our interfaces if possible
Nick Mathewson [Wed, 7 Dec 2011 23:16:32 +0000 (18:16 -0500)]
Use getifaddrs to detect our interfaces if possible

The old scheme involved connected UDP sockets and getsockname(), and is
generally best avoied.

13 years agoAdd evbuffer_copyout_from to copy data from the middle of a buffer
Nick Mathewson [Wed, 7 Dec 2011 18:04:35 +0000 (13:04 -0500)]
Add evbuffer_copyout_from to copy data from the middle of a buffer

You could previously do this with evbuffer_peek() and some memcpys,
but it was a bit more work than most folks wanted to get into.

Closes sourceforge ticket 3108072

13 years agoBypass event_add when using event_base_once() for a 0-sec timeout
Nick Mathewson [Wed, 7 Dec 2011 16:49:52 +0000 (11:49 -0500)]
Bypass event_add when using event_base_once() for a 0-sec timeout

Some people use event_base_once(EV_TIMEOUT) to make a callback get
called "immediately".  But this is pretty roundabout: it uses the
timeout heap to immediately put the event onto the active queue, when
it could just use event_active.  Additionally, it can lead to
surprising re-ordering behavior.

This patch changes event_base_once so it bypasses event_add() and
called event_active() directly on a pure-timeout event with an empty
timeout.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Tue, 6 Dec 2011 18:38:40 +0000 (13:38 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoFix a silly compilation error with the sun compiler
Colin Watt [Tue, 6 Dec 2011 18:35:54 +0000 (13:35 -0500)]
Fix a silly compilation error with the sun compiler

Apparently, other compilers were allowing "return free(x)" in a
function returning void.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Tue, 6 Dec 2011 16:02:12 +0000 (11:02 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoBe absolutely sure to clear pncalls before leaving event_signal_closure
Nick Mathewson [Mon, 5 Dec 2011 20:02:27 +0000 (15:02 -0500)]
Be absolutely sure to clear pncalls before leaving event_signal_closure

I thought we'd fixed the cases where this could come up, but
apparently having an event_base_break() happen while processing
signal events could get us in trouble.

Found by Remi Gacogne.  Sourceforge issue 3451433 .

13 years agofix windows compilation issues with new file segment code
Nick Mathewson [Fri, 2 Dec 2011 06:48:14 +0000 (01:48 -0500)]
fix windows compilation issues with new file segment code

Found by Linus Nordberg

13 years agoFix two issues in the allow_dirty_shutdown code.
Nick Mathewson [Thu, 24 Nov 2011 17:31:50 +0000 (12:31 -0500)]
Fix two issues in the allow_dirty_shutdown code.

First, it shouldn't crash when it's passed a non-ssl bufferevent.

Second, it should behave correctly when it gets a true argument
other than 1.

13 years agoTweak allow_dirty_shutdown documentation
Nick Mathewson [Thu, 24 Nov 2011 17:24:38 +0000 (12:24 -0500)]
Tweak allow_dirty_shutdown documentation

13 years agoAllow users to set allow_dirty_shutdown
Catalin Patulea [Tue, 22 Nov 2011 00:57:19 +0000 (19:57 -0500)]
Allow users to set allow_dirty_shutdown

13 years agobev_ssl: Be more specific in event callbacks. evhttp in particular gets confused...
Catalin Patulea [Tue, 22 Nov 2011 00:24:50 +0000 (19:24 -0500)]
bev_ssl: Be more specific in event callbacks. evhttp in particular gets confused without at least one of BEV_EVENT_{READING|WRITING}.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Fri, 18 Nov 2011 20:35:33 +0000 (15:35 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoIncrement version to 2.0.16-stable-dev
Nick Mathewson [Fri, 18 Nov 2011 20:34:37 +0000 (15:34 -0500)]
Increment version to 2.0.16-stable-dev

13 years agoIncrement version to 2.0.16-stable release-2.0.16-stable
Nick Mathewson [Fri, 18 Nov 2011 20:27:06 +0000 (15:27 -0500)]
Increment version to 2.0.16-stable

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Fri, 18 Nov 2011 20:16:11 +0000 (15:16 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoRevise 2.0.16-stable changelog
Nick Mathewson [Fri, 18 Nov 2011 20:14:50 +0000 (15:14 -0500)]
Revise 2.0.16-stable changelog

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Fri, 18 Nov 2011 19:23:13 +0000 (14:23 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoadd comment to new consider_reading code
Nick Mathewson [Thu, 17 Nov 2011 22:42:45 +0000 (17:42 -0500)]
add comment to new consider_reading code

13 years agoAvoid spinning on OpenSSL reads
Mark Ellzey [Thu, 17 Nov 2011 16:59:41 +0000 (11:59 -0500)]
Avoid spinning on OpenSSL reads

Previously, if some sender were generating data to read on an
OpenSSL connection as fast as we could process it, we could easily
wind up looping on an openssl do_read operation without ever
considering other sockets.

The difference between this and the original method in
consider_reading() is that it only loops for a single completed
*frame* instead of looping until fd is drained or an error condition
was triggered.

{Patch split out by nickm}

13 years agoMove SSL rate-limit enforcement into bytes_to_read()
Nick Mathewson [Thu, 17 Nov 2011 16:54:07 +0000 (11:54 -0500)]
Move SSL rate-limit enforcement into bytes_to_read()

13 years agoRefactor amount-to-read calculations in buffervent_ssl consider_reading()
Mark Ellzey [Thu, 17 Nov 2011 16:45:49 +0000 (11:45 -0500)]
Refactor amount-to-read calculations in buffervent_ssl consider_reading()

Split up consider_reading()'s conditional checks into another function
can_read() for simplicity sake.

{Split into a separate patch by nickm}

13 years agoRevert "Avoid potential SSL read spinlocks"
Nick Mathewson [Tue, 15 Nov 2011 23:34:24 +0000 (18:34 -0500)]
Revert "Avoid potential SSL read spinlocks"

This reverts commit fc52dbac87f4937f8306759506d6a2ad15ca244c.

13 years agoRevert "openssl bufferevent has the same issue with writing as prior commit."
Nick Mathewson [Tue, 15 Nov 2011 23:33:50 +0000 (18:33 -0500)]
Revert "openssl bufferevent has the same issue with writing as prior commit."

This reverts commit 7353663eb7c0b2a1caaaa5acd818515f156cf2ca.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Tue, 15 Nov 2011 22:22:45 +0000 (17:22 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoAdd new entries to changelog, new credits to README
Nick Mathewson [Tue, 15 Nov 2011 22:22:12 +0000 (17:22 -0500)]
Add new entries to changelog, new credits to README

13 years agoFix DNS memleak checks when running with malloc-replacement/debugging disabled
Nick Mathewson [Tue, 15 Nov 2011 22:11:42 +0000 (17:11 -0500)]
Fix DNS memleak checks when running with malloc-replacement/debugging disabled

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Mon, 14 Nov 2011 23:22:08 +0000 (18:22 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoDon't try to make notifiable event_base when no threading fns are configured
Nick Mathewson [Mon, 14 Nov 2011 22:33:02 +0000 (17:33 -0500)]
Don't try to make notifiable event_base when no threading fns are configured

13 years agoWarn when unable to construct base because of failing make_base_notifiable
Nick Mathewson [Mon, 14 Nov 2011 22:32:22 +0000 (17:32 -0500)]
Warn when unable to construct base because of failing make_base_notifiable

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Mon, 14 Nov 2011 16:55:37 +0000 (11:55 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoopenssl bufferevent has the same issue with writing as prior commit.
Mark Ellzey [Mon, 14 Nov 2011 15:57:15 +0000 (10:57 -0500)]
openssl bufferevent has the same issue with writing as prior commit.

13 years agoAvoid potential SSL read spinlocks
Mark Ellzey [Mon, 14 Nov 2011 15:24:07 +0000 (10:24 -0500)]
Avoid potential SSL read spinlocks

OpenSSL bufferevents with deferred callbacks enabled under high load will
spinlock in the function consider_reading(). This loop continues until all
data has been read.

Because of this condition; openssl bufferevents will never return back into
event_base_loop() until SSL_read has determined data is no longer ready.

As of yet I have not found a reason why this while loop exists, so this patch
just swaps out while for if.

If needed I can write same code which would trigger this effect; optionally
libevhtp has a test.c program which can be run with the following flags:

./test -s <keyfile.pem>

curl -vvvv -k -d@<HUGE_ASS_FILE> https://127.0.0.1:8081/

The return data will include the number of times the readcb got data and the
length of that read.

Without this patch, you are likely to see a small amount of "bytes read....",
otherwise the "bytes read..." return data should show much more reasonable
numbers.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Mon, 14 Nov 2011 16:45:17 +0000 (11:45 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

Conflicts:
sample/dns-example.c

13 years agounit tests for EVBUFFER_EOL_NUL
Nick Mathewson [Mon, 14 Nov 2011 16:43:31 +0000 (11:43 -0500)]
unit tests for EVBUFFER_EOL_NUL

13 years agoNew EVBUFFER_EOL_NUL to read NUL-terminated strings from an evbuffer
Andrea Montefusco [Mon, 14 Nov 2011 16:42:52 +0000 (11:42 -0500)]
New EVBUFFER_EOL_NUL to read NUL-terminated strings from an evbuffer

13 years agoTweaks, fixups, and comments on evbuffer_add_iovec
Nick Mathewson [Fri, 11 Nov 2011 22:56:08 +0000 (17:56 -0500)]
Tweaks, fixups, and comments on evbuffer_add_iovec

13 years agoAdded evbuffer_add_iovec and unit tests.
Mark Ellzey [Tue, 25 Oct 2011 13:13:15 +0000 (09:13 -0400)]
Added evbuffer_add_iovec and unit tests.

13 years agoImprove win32 behavior of dns-sample.c codex
Gisle Vanem [Wed, 9 Nov 2011 05:17:56 +0000 (00:17 -0500)]
Improve win32 behavior of dns-sample.c codex

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 3 Nov 2011 15:45:43 +0000 (11:45 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoFix typo in whatsnew-2.0.txt
Mansour Moufid [Thu, 3 Nov 2011 15:43:49 +0000 (11:43 -0400)]
Fix typo in whatsnew-2.0.txt

13 years agoMerge remote-tracking branch 'github/20_evbuffer_remove_bug'
Nick Mathewson [Thu, 3 Nov 2011 03:15:07 +0000 (23:15 -0400)]
Merge remote-tracking branch 'github/20_evbuffer_remove_bug'

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 3 Nov 2011 03:14:24 +0000 (23:14 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoUse the free-trailing-chains function in evbuffer_insert_chain too
Nick Mathewson [Thu, 3 Nov 2011 02:50:47 +0000 (22:50 -0400)]
Use the free-trailing-chains function in evbuffer_insert_chain too

13 years agoFix an evbuffer crash in evbuffer_remove_buffer()
Nick Mathewson [Wed, 2 Nov 2011 20:09:15 +0000 (16:09 -0400)]
Fix an evbuffer crash in evbuffer_remove_buffer()

Found by Greg Hazel.

13 years agoimprove test to remove at least one buffer from src
Greg Hazel [Wed, 2 Nov 2011 22:19:05 +0000 (15:19 -0700)]
improve test to remove at least one buffer from src

13 years agounit test for remove_buffer bug
Greg Hazel [Tue, 1 Nov 2011 20:44:40 +0000 (13:44 -0700)]
unit test for remove_buffer bug

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Mon, 31 Oct 2011 02:34:00 +0000 (22:34 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoFix compile warning from saying event2/*.h inside a comment
Nick Mathewson [Mon, 31 Oct 2011 02:32:18 +0000 (22:32 -0400)]
Fix compile warning from saying event2/*.h inside a comment

Based on a patch by Adrian Chadd

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Wed, 26 Oct 2011 14:17:21 +0000 (10:17 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoepoll: close fd on alloc fail at initialization
Jamie Iles [Wed, 26 Oct 2011 12:24:30 +0000 (13:24 +0100)]
epoll: close fd on alloc fail at initialization

If the memory allocations fail then we free any other allocated
structures but don't close the file descriptor resulting in an leak of
fd's.

13 years agoevhttp: Add evhttp_foreach_bound_socket.
Samy Al Bahra [Mon, 24 Oct 2011 01:31:55 +0000 (01:31 +0000)]
evhttp: Add evhttp_foreach_bound_socket.

Applies the function specified in the first argument to all
evhttp_bound_sockets associated with a struct evhttp. The user
must not attempt to free or remove any connections, sockets or
listeners in the callback function.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Tue, 25 Oct 2011 15:43:01 +0000 (11:43 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoUpdate copyright dates to 2011.
Nick Mathewson [Mon, 24 Oct 2011 17:18:09 +0000 (13:18 -0400)]
Update copyright dates to 2011.

13 years agoNew event_base_update_cache_time() to set cached_tv to current time
Abel Mathew [Fri, 21 Oct 2011 19:53:32 +0000 (19:53 +0000)]
New event_base_update_cache_time() to set cached_tv to current time

This function is particularly useful for selectively increasing
the accuracy of the cached time value in 'base' during callbacks
that take a long time to execute.

This function has no effect if the base is currently not in its
event loop or if timeval caching is disabled via EVENT_BASE_FLAG_NO_CACHE_TIME.

13 years agoAdd argument checks to some memory functions in `event.c'.
Mansour Moufid [Fri, 14 Oct 2011 21:16:03 +0000 (17:16 -0400)]
Add argument checks to some memory functions in `event.c'.

Add a zero check to the function `event_mm_malloc_',
i.e. simply return NULL if the sz argument is zero.
On failure, set errno to ENOMEM and return NULL.

Add a zero check to the function `event_mm_calloc_',
i.e. simply return NULL if either argument is zero.
Also add an unsigned integer multiplication check, and if an integer
overflow would occur, set errno to ENOMEM and return NULL.
On failure, set errno to ENOMEM and return NULL.

Add a NULL check to the function `event_mm_strdup_',
i.e. set errno to EINVAL and return NULL.
Also add an unsigned integer addition check, and if an integer
overflow would occur, set errno to ENOMEM and return NULL.
If a memory allocation error occurs, again set errno to ENOMEM
and return NULL.

Add unit tests to `test/regress_util.c'.

13 years agoAdd note about evhttp_send_reply_end to its doxygen
Nick Mathewson [Thu, 20 Oct 2011 02:59:47 +0000 (22:59 -0400)]
Add note about evhttp_send_reply_end to its doxygen

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 20 Oct 2011 02:44:33 +0000 (22:44 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoMore detailed message in case of libevent self-debugging failure.
Leonid Evdokimov [Wed, 19 Oct 2011 13:44:17 +0000 (17:44 +0400)]
More detailed message in case of libevent self-debugging failure.

13 years agoStyle and comment tweaks for dns/leak* tests
Nick Mathewson [Thu, 20 Oct 2011 02:41:11 +0000 (22:41 -0400)]
Style and comment tweaks for dns/leak* tests

13 years agoTest for commit aff6ba1
Leonid Evdokimov [Tue, 18 Oct 2011 13:49:40 +0000 (17:49 +0400)]
Test for commit aff6ba1

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 20 Oct 2011 02:20:15 +0000 (22:20 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoEmpty DNS reply with OK status is another way to say NODATA.
Leonid Evdokimov [Wed, 19 Oct 2011 18:38:37 +0000 (22:38 +0400)]
Empty DNS reply with OK status is another way to say NODATA.

Sometimes DNS reply has nothing but query section. It does not look like
error, so it should be treated as NODATA with TTL=0 as soon as there is
no SOA record to deduce negative TTL from.

13 years agoTests for 94fba5b and f72e8f6
Leonid Evdokimov [Wed, 19 Oct 2011 18:36:12 +0000 (22:36 +0400)]
Tests for 94fba5b and f72e8f6

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Wed, 12 Oct 2011 05:02:13 +0000 (01:02 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoBump version to 2.0.15-stable-dev
Nick Mathewson [Wed, 12 Oct 2011 05:00:23 +0000 (01:00 -0400)]
Bump version to 2.0.15-stable-dev

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Wed, 12 Oct 2011 04:57:55 +0000 (00:57 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoCredit a patch from a one-named user release-2.0.15-stable
Nick Mathewson [Wed, 12 Oct 2011 04:39:22 +0000 (00:39 -0400)]
Credit a patch from a one-named user

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Wed, 12 Oct 2011 04:22:54 +0000 (00:22 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoIncrement version to 2.0.15-stable
Nick Mathewson [Wed, 12 Oct 2011 04:22:17 +0000 (00:22 -0400)]
Increment version to 2.0.15-stable

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Wed, 12 Oct 2011 04:21:29 +0000 (00:21 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoAdd changelog for 2.0.15-stable
Nick Mathewson [Wed, 12 Oct 2011 04:16:12 +0000 (00:16 -0400)]
Add changelog for 2.0.15-stable

13 years agobufferevent: Add functions to set/get max_single_read/write values.
Alexander Drozdov [Tue, 11 Oct 2011 05:26:57 +0000 (09:26 +0400)]
bufferevent: Add functions to set/get max_single_read/write values.

13 years agoMake evbase_priority_init() and evbase_get_npriorities() threadsafe
Nick Mathewson [Tue, 11 Oct 2011 13:50:57 +0000 (09:50 -0400)]
Make evbase_priority_init() and evbase_get_npriorities() threadsafe

13 years agoAdd event_base_get_npriorities() function.
Alexander Drozdov [Tue, 11 Oct 2011 07:12:34 +0000 (11:12 +0400)]
Add event_base_get_npriorities() function.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Mon, 10 Oct 2011 15:34:26 +0000 (11:34 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agorefer to non-deprecated evdns functions in comments
Greg Hazel [Mon, 10 Oct 2011 15:24:43 +0000 (08:24 -0700)]
refer to non-deprecated evdns functions in comments

13 years agoMake evbuffer_file_segment_types adaptable
Nick Mathewson [Thu, 6 Oct 2011 22:02:22 +0000 (18:02 -0400)]
Make evbuffer_file_segment_types adaptable

Instead of having a file segment born as one type and stay that way
forever, let them start out unmapped, but map themselves as needed
if they need to get written out on a non-drains_to_fd evbuffer.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 6 Oct 2011 19:21:55 +0000 (15:21 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

Conflicts:
buffer.c
test/regress_buffer.c

13 years agoMerge remote-tracking branch 'github/20_addfile_ssl' into patches-2.0
Nick Mathewson [Thu, 6 Oct 2011 19:11:50 +0000 (15:11 -0400)]
Merge remote-tracking branch 'github/20_addfile_ssl' into patches-2.0

13 years agoMerge branch '21_largefile_support'
Nick Mathewson [Wed, 5 Oct 2011 19:03:17 +0000 (15:03 -0400)]
Merge branch '21_largefile_support'

13 years agoMerge branch '21_evloop_noexit'
Nick Mathewson [Wed, 5 Oct 2011 15:26:52 +0000 (11:26 -0400)]
Merge branch '21_evloop_noexit'

13 years agoNew EVLOOP_NO_EXIT_ON_EMPTY option to keep looping even when no events are pending
Nick Mathewson [Thu, 2 Dec 2010 02:53:08 +0000 (21:53 -0500)]
New EVLOOP_NO_EXIT_ON_EMPTY option to keep looping even when no events are pending

This can be useful if you want to start an event loop and then add or
remove events to it from another thread.

13 years agoAllow evconnlistener to be created in disabled state.
Alexander Drozdov [Mon, 3 Oct 2011 04:12:32 +0000 (08:12 +0400)]
Allow evconnlistener to be created in disabled state.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Mon, 3 Oct 2011 16:54:35 +0000 (12:54 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoFix some "value never used" warnings with gcc 4.6.1
Nick Mathewson [Mon, 3 Oct 2011 16:49:02 +0000 (12:49 -0400)]
Fix some "value never used" warnings with gcc 4.6.1

13 years agoMake write-checking fixes use tt_fail_perror
Nick Mathewson [Mon, 3 Oct 2011 16:45:36 +0000 (12:45 -0400)]
Make write-checking fixes use tt_fail_perror

13 years agoFixed compiler warnings for unchecked read/write calls.
Mark Ellzey [Tue, 12 Jul 2011 17:05:36 +0000 (13:05 -0400)]
Fixed compiler warnings for unchecked read/write calls.

13 years agoPrefer mmap to sendfile unless a DRAINS_TO_FD flag is set. Allows add_file to work...
Nick Mathewson [Thu, 29 Sep 2011 13:30:04 +0000 (09:30 -0400)]
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.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Wed, 28 Sep 2011 13:23:41 +0000 (09:23 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoMake evbuffer callbacks get the right n_added value after evbuffer_add
Nick Mathewson [Wed, 28 Sep 2011 13:22:17 +0000 (09:22 -0400)]
Make evbuffer callbacks get the right n_added value after evbuffer_add

Patch from Alex.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Mon, 26 Sep 2011 15:11:30 +0000 (11:11 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoMerge branch '20_loopbreak_in_signal' into patches-2.0
Nick Mathewson [Mon, 26 Sep 2011 15:07:58 +0000 (11:07 -0400)]
Merge branch '20_loopbreak_in_signal' into patches-2.0

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Sun, 25 Sep 2011 11:41:29 +0000 (07:41 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoUse _SOURCES, not _sources, in sample/Makefile.am
Nick Mathewson [Sun, 25 Sep 2011 11:39:00 +0000 (07:39 -0400)]
Use _SOURCES, not _sources, in sample/Makefile.am

Found by Adrian Chadd

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Fri, 16 Sep 2011 13:47:14 +0000 (09:47 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agole-proxy and regress depend on openssl directly
Sergey Avseyev [Thu, 15 Sep 2011 10:06:38 +0000 (13:06 +0300)]
le-proxy and regress depend on openssl directly

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Mon, 12 Sep 2011 19:46:54 +0000 (15:46 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoAdd DNS_ERR_NODATA error code to handle empty replies.
Leonid Evdokimov [Wed, 10 Aug 2011 11:58:47 +0000 (15:58 +0400)]
Add DNS_ERR_NODATA error code to handle empty replies.

13 years agoFix docstring in dns.h
Leonid Evdokimov [Wed, 10 Aug 2011 11:58:19 +0000 (15:58 +0400)]
Fix docstring in dns.h