Nick Mathewson
6b23518d85
Merge remote-tracking branch 'origin/patches-2.0'
2011-05-06 11:06:11 -04:00
Sebastian Hahn
5786b91e2e
Fix a compile warning with zlib 1.2.4 and 1.2.5
...
I took this fix from Tor (commit 1a52e39c22d5, author Nick Mathewson,
Copyright (c) 2007-2011, The Tor Project, Inc.) and adapted it slightly
for libevent.
2011-05-06 10:58:06 -04:00
Sebastian Hahn
66193853fd
Correctly detect openssl on windows
2011-05-06 10:58:06 -04:00
Mark Ellzey
aee1a97da4
Performance tweak to evhttp_parse_request_line.
...
Method parsing has been tweaked out to use a lookup table instead of multiple
branching. In our testing it has increased performance by a fair bit.
2011-05-06 08:48:54 -04:00
Sebastian Hahn
ceb03b90c4
Move the win32 detection in configure.in
2011-05-06 02:06:36 +02:00
Sebastian Hahn
292092eb29
Use OPENSSL_LIBS in Makefile.am
2011-05-06 02:06:32 +02:00
Nick Mathewson
7889c43ef8
Merge remote-tracking branch 'origin/patches-2.0'
2011-05-04 16:23:02 -04:00
Peter Rosin
7b819f2d97
Libtool brings in the dependencies of libevent_openssl.la automatically
2011-05-04 16:18:51 -04:00
Peter Rosin
274dd0369a
libssl depends on libcrypto, not the other way around.
2011-05-04 16:18:46 -04:00
Nick Mathewson
9610797471
Merge remote-tracking branch 'origin/patches-2.0'
2011-05-03 14:29:44 -04:00
Nick Mathewson
d11e9e0f71
Oops; that new unit test breaks for epoll. Fix it.
2011-05-03 14:22:48 -04:00
Nick Mathewson
28317a087e
Fix a warn-and-fail bug in kqueue by providing kevent() room to report errors
...
Apparently, kevent fails gracefully if there is not enough space in its
output events array to report every _event_... but it just dies and returns
-1 if there is not enough space to report every _error_.
There are a couple of possible fixes here. One would to handle -1
returns from kevent better by re-growing the array and retrying... but
that seems a little error prone. Instead, I'm just going to say that
the events array must be large enough to handle all the errors.
This patch also adds a unit test designed to make sure that our
many-events-out code works even if not all the events are added at
once.
2011-05-03 13:54:57 -04:00
Nick Mathewson
22d50db805
Merge remote-tracking branch 'origin/patches-2.0'
2011-05-02 23:22:34 -04:00
Nick Mathewson
9556a7d1f6
Add missing words to EVLOOP_NONBLOCK documentation
2011-05-02 23:22:09 -04:00
Nick Mathewson
1cae22605d
Merge remote-tracking branch 'origin/patches-2.0'
2011-04-27 21:28:32 -04:00
Nick Mathewson
e7529fa45b
Bump version to 2.0.11-stable-dev
2011-04-27 21:28:11 -04:00
Nick Mathewson
fc9bc65669
Merge remote-tracking branch 'origin/patches-2.0'
2011-04-27 20:26:38 -04:00
Nick Mathewson
d4d55196bd
Increment version number to 2.0.11-stable
release-2.0.11-stable
2011-04-27 20:25:57 -04:00
Nick Mathewson
aaa80ed491
Merge remote-tracking branch 'origin/patches-2.0'
2011-04-27 20:17:34 -04:00
Nick Mathewson
8255fda708
Add more people to the acknowledgments
2011-04-27 20:15:20 -04:00
Nick Mathewson
6c2ef970c3
Merge remote-tracking branch 'origin/patches-2.0'
2011-04-27 20:07:13 -04:00
Nick Mathewson
d30466fc26
Changelog for 2.0.11-stable
2011-04-27 20:03:46 -04:00
Nick Mathewson
614b9bd1f3
Merge remote-tracking branch 'origin/patches-2.0'
2011-04-26 23:48:31 -04:00
Nick Mathewson
e49e64e774
Fix clang warning when resetting connection
...
This was a regression on 2.0.10-stable: clang was warning about
values that were unused (because event_debug wasn't using them unless
USE_DEBUG was defined). Found by Sebastian Hahn.
2011-04-26 23:42:01 -04:00
Nick Mathewson
cea45590e2
Merge remote-tracking branch 'origin/patches-2.0'
2011-04-24 22:56:16 -04:00
Nick Mathewson
ea0d019b71
Use AM_CONDITIONAL, not AC_SUBST, to tell automake to build regress
...
For some reason, this makes mingw much happier about building
regress.exe by default. No, I'm afraid I don't know why.
2011-04-23 02:35:17 -04:00
Nick Mathewson
18f24ef4d5
Merge remote-tracking branch 'origin/patches-2.0'
2011-04-23 02:31:59 -04:00
Nick Mathewson
7739c86da0
Fix msvc build: it needed to know about _EVENT_HAVE_STRUCT_SOCKADDR_STORAGE
2011-04-23 02:31:04 -04:00
Nick Mathewson
53d1e450f4
Try to fix up CHECK_REGRESS hack to not break on win32
2011-04-23 01:48:11 -04:00
Nick Mathewson
dd68cce439
Add missing header for regress_http compilation on win32
2011-04-23 01:47:43 -04:00
Nick Mathewson
99f147d9f6
Merge branch '20_iocp_conn_sockopt' into patches-2.0
2011-04-23 01:47:11 -04:00
Nick Mathewson
52f9baeee2
call setsockopt correctly on connecting() IOCP-bufferevents so shutdown() will work
2011-04-23 01:46:39 -04:00
Nick Mathewson
614a1712b7
Merge remote-tracking branch 'origin/patches-2.0'
...
Conflicts:
evthread.c
2011-04-22 23:46:25 -04:00
Sebastian Hahn
646f9feb26
Zero a struct sockaddr_in before using it
...
Found by Dave Heart
2011-04-23 02:22:08 +02:00
Sebastian Hahn
744c7456c7
Remote some dead code from dns-example.c
...
Found by Dave Heart
2011-04-23 02:20:59 +02:00
Sebastian Hahn
93a1abb374
Check return value of evbuffer_add_cb in tests
...
Caught by clang's static analyzer
2011-04-23 02:04:58 +02:00
Sebastian Hahn
4bac793e3e
Be nice and "handle" error return values in sample code
...
Caught by clang's static analyzer
2011-04-23 02:04:58 +02:00
Sebastian Hahn
48c44a6dda
Refactor test_getaddrinfo_async_cancel_stress()
...
Turns out it didn't need an event base set up.
Spotted by clang's static anaylzer
2011-04-23 02:04:58 +02:00
Sebastian Hahn
65707d7c3c
add some (void) casts for unused variables
...
All these places already have an XXX marker, so we know we need to fix
them later. Let's not clutter the static analysis results with them.
2011-04-23 02:04:58 +02:00
Sebastian Hahn
b693c324ca
Actually send NULL request in http_bad_request_test
...
Issue caught by clang's static analyzer
2011-04-23 02:04:58 +02:00
Sebastian Hahn
3819b62cea
Add a forgotten return value check in the unit tests
...
Spotted by clang's static analyzer
2011-04-23 02:04:58 +02:00
Sebastian Hahn
b0ff7eb5ce
Add an assert to appease clang's static analyzer
...
It got confused because in EVLOCK_ASSERT_LOCKED(lock) there is an if
(lock) check.
2011-04-23 02:04:58 +02:00
Sebastian Hahn
5208544edc
Fix possible NULL-deref in evdns_cancel_request
...
The clang static analyzer complained that base might be dereferenced
without being set, but this patch should fix another dereference issue.
2011-04-23 02:04:58 +02:00
Sebastian Hahn
12311ff46e
Add a forgotten NULL check to evhttp_parse_headers
...
Issue detected by the clang static analyzer
2011-04-23 02:04:58 +02:00
Sebastian Hahn
ad9ff5834a
Fix compilation under LLVM/clang with --enable-gcc-warnings
...
When compiling using clang (2.9 or lower) do not enable
-Wnormalized=id or -Woverride-init when --enable-gcc-warnings
or --enable-gcc-warnings-advisory is set as these options
are unsupported.
This commit is based on a patch for Tor
(git commit 56bdc844ba68ac0911efc7ad3398f1eafeaaac76 by Steven
Murdoch), Copyright (c) 2007-2011, The Tor Project, Inc.
2011-04-23 02:03:48 +02:00
Nick Mathewson
cb6ecee7f6
Complain if the caller tries to change threading cbs after setting them
...
We never supported this; it was always fraught with errors; and I
don't believe there is a good reason to _want_ it to work.
2011-04-22 14:06:57 -04:00
Nick Mathewson
b683cae3cb
Avoid race-condition when initializing global locks
...
Previously, we did stuff like
if (!lock)
EVTHREAD_ALLOC_LOCK(lock,0);
for the evsig base global lock, the arc4random lock, and the debug_map
lock. But that's potentially racy! Instead, we move the
responisiblity for global lock initialization to the functions where
we set up the lock callbacks.
(Rationale: We already require that you set up the locking callbacks
before you create any event_base, and that you do so exatly once.)
2011-04-22 14:06:33 -04:00
Nick Mathewson
34631be00c
Merge remote-tracking branch 'origin/patches-2.0'
2011-04-21 17:36:30 -04:00
Nick Mathewson
b4f89f00c6
Fix a memory leak on win32 socket->event map.
...
This would lose some memory every time an event_base was freed on win32.
Found by Dimitre Piskyulev.
2011-04-21 17:33:13 -04:00
Nick Mathewson
364291e9a9
Handle calloc failure in evdns. (Found by Dave Hart)
2011-04-21 17:11:41 -04:00