Nick Mathewson
748a0d2794
Merge remote-tracking branch 'origin/patches-2.0'
2011-12-06 13:38:40 -05:00
Colin Watt
19277763b2
Fix a silly compilation error with the sun compiler
...
Apparently, other compilers were allowing "return free(x)" in a
function returning void.
2011-12-06 13:35:54 -05:00
Nick Mathewson
9ce5053d6e
Merge remote-tracking branch 'origin/patches-2.0'
2011-12-06 11:02:12 -05:00
Nick Mathewson
11f36a5f76
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 .
2011-12-05 15:06:46 -05:00
Nick Mathewson
da45aa74a7
fix windows compilation issues with new file segment code
...
Found by Linus Nordberg
2011-12-02 01:48:17 -05:00
Nick Mathewson
f3b89dec9e
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.
2011-11-24 12:31:50 -05:00
Nick Mathewson
a44cd2b020
Tweak allow_dirty_shutdown documentation
2011-11-24 12:24:38 -05:00
Catalin Patulea
099d27df2b
Allow users to set allow_dirty_shutdown
2011-11-24 12:18:30 -05:00
Catalin Patulea
f7eb69ace4
bev_ssl: Be more specific in event callbacks. evhttp in particular gets confused without at least one of BEV_EVENT_{READING|WRITING}.
2011-11-24 12:18:23 -05:00
Nick Mathewson
3596a31d63
Merge remote-tracking branch 'origin/patches-2.0'
2011-11-18 15:35:33 -05:00
Nick Mathewson
ba4d66961e
Increment version to 2.0.16-stable-dev
2011-11-18 15:34:37 -05:00
Nick Mathewson
5de3fa3208
Increment version to 2.0.16-stable
release-2.0.16-stable
2011-11-18 15:27:06 -05:00
Nick Mathewson
044c41de84
Merge remote-tracking branch 'origin/patches-2.0'
2011-11-18 15:16:11 -05:00
Nick Mathewson
31c99bd28f
Revise 2.0.16-stable changelog
2011-11-18 15:14:50 -05:00
Nick Mathewson
9ee9e943a8
Merge remote-tracking branch 'origin/patches-2.0'
2011-11-18 14:23:13 -05:00
Nick Mathewson
ebf82199df
add comment to new consider_reading code
2011-11-17 17:42:45 -05:00
Mark Ellzey
2aa036fa04
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}
2011-11-17 11:59:41 -05:00
Nick Mathewson
96c562fa49
Move SSL rate-limit enforcement into bytes_to_read()
2011-11-17 11:54:07 -05:00
Mark Ellzey
a186e73200
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}
2011-11-17 11:45:49 -05:00
Nick Mathewson
6660c9a347
Revert "Avoid potential SSL read spinlocks"
...
This reverts commit fc52dbac87f4937f8306759506d6a2ad15ca244c.
2011-11-15 18:34:24 -05:00
Nick Mathewson
a62346dec7
Revert "openssl bufferevent has the same issue with writing as prior commit."
...
This reverts commit 7353663eb7c0b2a1caaaa5acd818515f156cf2ca.
2011-11-15 18:33:50 -05:00
Nick Mathewson
fe9e831ffb
Merge remote-tracking branch 'origin/patches-2.0'
2011-11-15 17:22:45 -05:00
Nick Mathewson
34045c8fd4
Add new entries to changelog, new credits to README
2011-11-15 17:22:12 -05:00
Nick Mathewson
b17b0eec02
Fix DNS memleak checks when running with malloc-replacement/debugging disabled
2011-11-15 17:11:42 -05:00
Nick Mathewson
f5b937e65f
Merge remote-tracking branch 'origin/patches-2.0'
2011-11-14 18:22:08 -05:00
Nick Mathewson
e787413329
Don't try to make notifiable event_base when no threading fns are configured
2011-11-14 17:33:02 -05:00
Nick Mathewson
4e797f388f
Warn when unable to construct base because of failing make_base_notifiable
2011-11-14 17:32:22 -05:00
Nick Mathewson
2ebc8c80bf
Merge remote-tracking branch 'origin/patches-2.0'
2011-11-14 11:55:37 -05:00
Mark Ellzey
7353663eb7
openssl bufferevent has the same issue with writing as prior commit.
2011-11-14 11:52:59 -05:00
Mark Ellzey
fc52dbac87
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.
2011-11-14 11:52:51 -05:00
Nick Mathewson
9ae6e5959d
Merge remote-tracking branch 'origin/patches-2.0'
...
Conflicts:
sample/dns-example.c
2011-11-14 11:45:17 -05:00
Nick Mathewson
54142c9458
unit tests for EVBUFFER_EOL_NUL
2011-11-14 11:43:31 -05:00
Andrea Montefusco
d7a8b36eaf
New EVBUFFER_EOL_NUL to read NUL-terminated strings from an evbuffer
2011-11-14 11:42:52 -05:00
Nick Mathewson
27b5398fe0
Tweaks, fixups, and comments on evbuffer_add_iovec
2011-11-11 17:56:08 -05:00
Mark Ellzey
aaec5aca01
Added evbuffer_add_iovec and unit tests.
2011-11-11 17:39:28 -05:00
Gisle Vanem
a3f320e83d
Improve win32 behavior of dns-sample.c codex
2011-11-09 00:17:56 -05:00
Nick Mathewson
95af043314
Merge remote-tracking branch 'origin/patches-2.0'
2011-11-03 11:45:43 -04:00
Mansour Moufid
674bc6a29e
Fix typo in whatsnew-2.0.txt
2011-11-03 11:43:49 -04:00
Nick Mathewson
dea055d026
Merge remote-tracking branch 'github/20_evbuffer_remove_bug'
2011-11-02 23:15:07 -04:00
Nick Mathewson
c882a95956
Merge remote-tracking branch 'origin/patches-2.0'
2011-11-02 23:14:24 -04:00
Nick Mathewson
b18c04dd74
Use the free-trailing-chains function in evbuffer_insert_chain too
2011-11-02 22:50:47 -04:00
Nick Mathewson
c37069cd79
Fix an evbuffer crash in evbuffer_remove_buffer()
...
Found by Greg Hazel.
2011-11-02 22:48:16 -04:00
Greg Hazel
7eb52eb85e
improve test to remove at least one buffer from src
2011-11-02 22:47:02 -04:00
Greg Hazel
90bd620fa3
unit test for remove_buffer bug
2011-11-02 13:40:16 -04:00
Nick Mathewson
0014591865
Merge remote-tracking branch 'origin/patches-2.0'
2011-10-30 22:34:00 -04:00
Nick Mathewson
447b0bad15
Fix compile warning from saying event2/*.h inside a comment
...
Based on a patch by Adrian Chadd
2011-10-30 22:32:18 -04:00
Nick Mathewson
0cb70e3333
Merge remote-tracking branch 'origin/patches-2.0'
2011-10-26 10:17:21 -04:00
Jamie Iles
1aee718362
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.
2011-10-26 10:14:49 -04:00
Samy Al Bahra
a2c48e3be8
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.
2011-10-25 22:17:24 -04:00
Nick Mathewson
356554c8dc
Merge remote-tracking branch 'origin/patches-2.0'
2011-10-25 11:43:01 -04:00