]> granicus.if.org Git - libevent/log
libevent
12 years agoAdd a new test: test-fdleak which tests for fd leaks by creating many sockets.
Ross Lagerwall [Thu, 23 Feb 2012 19:40:02 +0000 (21:40 +0200)]
Add a new test: test-fdleak which tests for fd leaks by creating many sockets.

This test opens a server socket, and forks a child which connects to that
server socket many times. It sets a low number for the max open file limit
to catch any file descriptor leaks.
It would not work on Windows since it uses fork() to be able to create both the
server and the clients.

12 years agoIf accept4 is absent, fall back to accept.
Nick Mathewson [Wed, 22 Feb 2012 01:39:17 +0000 (20:39 -0500)]
If accept4 is absent, fall back to accept.

12 years agoAvoid leaking fd in evutil_socket() by Linux.
Nick Mathewson [Wed, 22 Feb 2012 01:38:36 +0000 (20:38 -0500)]
Avoid leaking fd in evutil_socket() by Linux.

Found by Amarin Phaosawasdi

12 years agoRemove the last vestiges of _EVENT_USE_EVENTLIST
Nick Mathewson [Mon, 20 Feb 2012 19:07:08 +0000 (14:07 -0500)]
Remove the last vestiges of _EVENT_USE_EVENTLIST

12 years agoMerge branch '21_eventlist_v3_squashed'
Nick Mathewson [Mon, 20 Feb 2012 18:56:13 +0000 (13:56 -0500)]
Merge branch '21_eventlist_v3_squashed'

12 years agoAdd doxygen for event_base_dump_events
Nick Mathewson [Sun, 12 Feb 2012 02:05:50 +0000 (21:05 -0500)]
Add doxygen for event_base_dump_events

12 years agoRefactor the functions that run over every event.
Nick Mathewson [Sun, 12 Feb 2012 02:01:53 +0000 (21:01 -0500)]
Refactor the functions that run over every event.

Now there are appropriate "for each event", "for each fd", and "for
each signal" helpers that they can use; this makes the code a bit
simpler, and far less duplicated.

This lets me turn back on the functions I disabled when removing
eventlist.

Additionally, check more lists for circularity in
event_base_assert_ok().

Add typedefs for the callback types.

Name fewer things "ctx".

Adds an implementation of Floyd's tortoise-and-hare algorithm to check
for circularity in TAILQs and LISTs, to avoid the abuse of flags that
event_base_assert_ok() was doing before.

Suggested by Dave Hart.

12 years agoFix an "unused return value" warning on write() in signal handler
Nick Mathewson [Fri, 17 Feb 2012 15:42:56 +0000 (10:42 -0500)]
Fix an "unused return value" warning on write() in signal handler

12 years agoStart work on a 2.1 changelog and whats-new
Nick Mathewson [Thu, 16 Feb 2012 06:21:42 +0000 (01:21 -0500)]
Start work on a 2.1 changelog and whats-new

12 years agoAdd another caveat to the TCP_DEFER_ACCEPT documentation
Nick Mathewson [Thu, 16 Feb 2012 02:27:52 +0000 (21:27 -0500)]
Add another caveat to the TCP_DEFER_ACCEPT documentation

12 years agoSupport TCP_DEFER_ACCEPT sockopts for listeners
Mark Ellzey [Tue, 14 Feb 2012 23:04:52 +0000 (18:04 -0500)]
Support TCP_DEFER_ACCEPT sockopts for listeners

A listening socket can be enabled with the sockopt
TCP_DEFER_ACCEPT. This informs the kernel to not call the user-land
accept() until real data has been written to the socket.

A new flag LEV_OPT_DEFERRED_ACCEPT has been introduced to
automatically set this option. Optionally
evutil_make_tcp_listen_socket_deferred() can be called manually.

(Tweaked slightly by nickm.)

12 years agoMerge remote-tracking branch 'github/21_fast_syscalls'
Nick Mathewson [Thu, 16 Feb 2012 02:07:44 +0000 (21:07 -0500)]
Merge remote-tracking branch 'github/21_fast_syscalls'

12 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 16 Feb 2012 01:26:52 +0000 (20:26 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

12 years agoStop crashing in evdns when nameserver probes give a weird error
Nick Mathewson [Thu, 16 Feb 2012 01:12:32 +0000 (20:12 -0500)]
Stop crashing in evdns when nameserver probes give a weird error

When a nameserver is down, we periodically try sending a "probe"
message to that nameserver to see if it has come back up.  If a
nameserver comes up, we cancel any pending probe messages.

Cancelling a probe message while handling the probe's response would
result in a access-after-free or a double-free, so when we notice that
we're about to call a nameserver up because of having received a probe
from it, we need to check whether current response is the response
from the probe.

There was a case where we didn't to that, though: when the resolver
gave us an unusual error response to our request that it resolve
google.com.  This is pretty rare, but apparently it can happen with
some weird cacheing nameservers -- the one on the mikrotik router, for
example.  Without this patch, we would crash with a NULL pointer
derefernce.

Thanks to Hannes Sowa for finding this issue and helping me track it
down.

12 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Tue, 14 Feb 2012 20:44:03 +0000 (15:44 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

Conflicts:
configure.in

12 years agoChanged OPENSSL_LDFLAGS to OPENSSL_LIBADD
Mark Ellzey [Tue, 14 Feb 2012 20:37:58 +0000 (15:37 -0500)]
Changed OPENSSL_LDFLAGS to OPENSSL_LIBADD

12 years agoAdded OPENSSL_LDFLAGS env variable which is appended to SSL checks.
Mark Ellzey [Tue, 14 Feb 2012 20:01:02 +0000 (15:01 -0500)]
Added OPENSSL_LDFLAGS env variable which is appended to SSL checks.

If openssl is not installed system-wide or not compiled as a shared library,
some systems require various link flags (e.g., -ld).

12 years agoIf open(O_CLOEXEC) fails, fall back to fcntl(CLOEXEC)
Nick Mathewson [Tue, 14 Feb 2012 16:48:55 +0000 (11:48 -0500)]
If open(O_CLOEXEC) fails, fall back to fcntl(CLOEXEC)

This is needed for folks who build with recent Linux kernel headers
but run with older kernels.

12 years agoFix up usage of reserved identifiers in ht-internal.h
Nick Mathewson [Mon, 13 Feb 2012 23:34:00 +0000 (18:34 -0500)]
Fix up usage of reserved identifiers in ht-internal.h

12 years agoPort changes from Tor for ht-internal.h
Nick Mathewson [Mon, 13 Feb 2012 23:04:05 +0000 (18:04 -0500)]
Port changes from Tor for ht-internal.h

12 years agoInvert the sense and the name of HT_CACHE_HASH_VALUES
Nick Mathewson [Mon, 13 Feb 2012 22:59:14 +0000 (17:59 -0500)]
Invert the sense and the name of HT_CACHE_HASH_VALUES

This is meant to make it easier to merge ht-internal.h back upstream
into Tor.

12 years agoSynchronize with upstream tinytest
Nick Mathewson [Mon, 13 Feb 2012 22:49:17 +0000 (17:49 -0500)]
Synchronize with upstream tinytest

12 years agoMerge in a punctuation fix from upstream tinytest
Nick Mathewson [Mon, 13 Feb 2012 22:30:46 +0000 (17:30 -0500)]
Merge in a punctuation fix from upstream tinytest

12 years agoMove libevent 1.x headers to include/, to put all public headers in one place.
Nick Mathewson [Mon, 13 Feb 2012 17:19:08 +0000 (12:19 -0500)]
Move libevent 1.x headers to include/, to put all public headers in one place.

12 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Sun, 12 Feb 2012 02:20:47 +0000 (21:20 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

12 years agoTweak the evutil_open_closeonexec patch to work on windows, old unixes.
Nick Mathewson [Sun, 12 Feb 2012 02:17:18 +0000 (21:17 -0500)]
Tweak the evutil_open_closeonexec patch to work on windows, old unixes.

Windows doesn't have a mode_t as far as I can tell.

Some unixes, iirc, don't like three-argument open without O_CREAT.

12 years agoMake uses of open() close-on-exec safe by introducing evutil_open_closeonexec.
Ross Lagerwall [Sat, 11 Feb 2012 15:23:17 +0000 (17:23 +0200)]
Make uses of open() close-on-exec safe by introducing evutil_open_closeonexec.

In a multi-process/threaded environment, opening fds internally
without the close-on-exec flag could leak fds to child processes.

12 years agoAdd a bufferevent_getcb() to find a bufferevent's current callbacks
Nick Mathewson [Sat, 11 Feb 2012 17:04:15 +0000 (12:04 -0500)]
Add a bufferevent_getcb() to find a bufferevent's current callbacks

12 years agoAlso make win32select.c conditional for IDE users
Nick Mathewson [Sat, 11 Feb 2012 04:56:49 +0000 (23:56 -0500)]
Also make win32select.c conditional for IDE users

12 years agoMerge branch 'ifdef' of git://github.com/rosslagerwall/libevent
Nick Mathewson [Sat, 11 Feb 2012 04:52:27 +0000 (23:52 -0500)]
Merge branch 'ifdef' of git://github.com/rosslagerwall/libevent

12 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Sat, 11 Feb 2012 04:51:11 +0000 (23:51 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

12 years agoAdd an empty section to the changelog for 2.0.18-stable
Nick Mathewson [Sat, 11 Feb 2012 03:20:05 +0000 (22:20 -0500)]
Add an empty section to the changelog for 2.0.18-stable

12 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Sat, 11 Feb 2012 03:18:19 +0000 (22:18 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

12 years agoCorrect a name in the credits. oops
Nick Mathewson [Sat, 11 Feb 2012 03:17:59 +0000 (22:17 -0500)]
Correct a name in the credits. oops

12 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Sat, 11 Feb 2012 03:16:46 +0000 (22:16 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

12 years agoBump version to 2.0.17-stable-dev
Nick Mathewson [Sat, 11 Feb 2012 03:16:14 +0000 (22:16 -0500)]
Bump version to 2.0.17-stable-dev

12 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Fri, 10 Feb 2012 23:50:17 +0000 (18:50 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

12 years agoUpdate the credits in the readme release-2.0.17-stable
Nick Mathewson [Fri, 10 Feb 2012 23:39:31 +0000 (18:39 -0500)]
Update the credits in the readme

12 years agoFinalize the changelog
Nick Mathewson [Fri, 10 Feb 2012 23:36:10 +0000 (18:36 -0500)]
Finalize the changelog

12 years agoFix compilation on osx
Nick Mathewson [Fri, 10 Feb 2012 23:04:04 +0000 (18:04 -0500)]
Fix compilation on osx

12 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Fri, 10 Feb 2012 22:33:50 +0000 (17:33 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

Conflicts:
Makefile.am
WIN32-Code/event2/event-config.h
configure.in

12 years agoUpdate copyright notices to 2012
Nick Mathewson [Fri, 10 Feb 2012 22:29:53 +0000 (17:29 -0500)]
Update copyright notices to 2012

12 years agoBump version to 2.0.17-stable
Nick Mathewson [Fri, 10 Feb 2012 21:49:05 +0000 (16:49 -0500)]
Bump version to 2.0.17-stable

12 years agoPrefer epoll_create1 on Linuxen that have it
Nick Mathewson [Fri, 10 Feb 2012 21:39:46 +0000 (16:39 -0500)]
Prefer epoll_create1 on Linuxen that have it

12 years agoSave some syscalls when constructing a socket for a bufferevent
Nick Mathewson [Fri, 10 Feb 2012 21:33:25 +0000 (16:33 -0500)]
Save some syscalls when constructing a socket for a bufferevent

12 years agoSave some syscalls when creating evdns sockets
Nick Mathewson [Fri, 10 Feb 2012 21:32:50 +0000 (16:32 -0500)]
Save some syscalls when creating evdns sockets

12 years agoSave syscalls when constructing listener sockets for evhttp
Nick Mathewson [Fri, 10 Feb 2012 21:32:32 +0000 (16:32 -0500)]
Save syscalls when constructing listener sockets for evhttp

12 years agoUse pipes for telling signals to main thread when possible
Nick Mathewson [Fri, 10 Feb 2012 21:25:53 +0000 (16:25 -0500)]
Use pipes for telling signals to main thread when possible

12 years agoUse a wrapper function to create the notification pipe/socketpair/eventfd
Nick Mathewson [Fri, 10 Feb 2012 21:15:10 +0000 (16:15 -0500)]
Use a wrapper function to create the notification pipe/socketpair/eventfd

12 years agoThe LEV_OPT_CLOSE_ON_EXEC flag now applies to accepted listener sockets too
Nick Mathewson [Fri, 10 Feb 2012 21:14:09 +0000 (16:14 -0500)]
The LEV_OPT_CLOSE_ON_EXEC flag now applies to accepted listener sockets too

12 years agoMinimize syscalls during socket creation in listener.c
Nick Mathewson [Fri, 10 Feb 2012 21:13:30 +0000 (16:13 -0500)]
Minimize syscalls during socket creation in listener.c

12 years agoInfrastructure for using faster/fewer syscalls when creating sockets
Nick Mathewson [Fri, 10 Feb 2012 20:55:15 +0000 (15:55 -0500)]
Infrastructure for using faster/fewer syscalls when creating sockets

Linux provides some features that allow avoiding extra calls to
fcntl when creating new nonblocking/close-on-exec sockets, so
we can add wrapper functions to emulate those when they are not
available.

Additionally, even when we are emulating those functions, we can
take a fast path that cuts our fcntl calls in half: we don't need to
look up the previous value of a file's flags when we have just
created it.

12 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Fri, 10 Feb 2012 17:05:39 +0000 (12:05 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

12 years agoIn the kqueue backend, do not report EBADF as an EV_READ
Nick Mathewson [Fri, 10 Feb 2012 16:24:51 +0000 (11:24 -0500)]
In the kqueue backend, do not report EBADF as an EV_READ

We were doing this because of (correct) reports that NetBSD gives an
EBADF when you try to add the write side of a pipe for which the
read side has been closed.  But on most kqueue platforms, that
doesn't happen, and on *all* kqueue platforms, reporting a
nonexistent fd (which we usually have if we have seen EBADF) as
readable tends to give programs a case of the vapors.

Nicholas Marriott wrote the original patch here; I did the comment
fixes.

12 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 9 Feb 2012 20:16:02 +0000 (15:16 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

12 years agoAvoid crash when freeing event_iocp and using event_set_mem_functions
Nick Mathewson [Thu, 9 Feb 2012 20:07:19 +0000 (15:07 -0500)]
Avoid crash when freeing event_iocp and using event_set_mem_functions

There was a calloc that needed to be an mm_calloc.

Reported by "fffvvvzz" on sourceforge.  Ticket 3486114

12 years agoPut #ifdef around some files to support alternate build systems.
Ross Lagerwall [Wed, 8 Feb 2012 16:46:00 +0000 (18:46 +0200)]
Put #ifdef around some files to support alternate build systems.

12 years agoBring the changelog up to date
Nick Mathewson [Tue, 7 Feb 2012 02:18:25 +0000 (21:18 -0500)]
Bring the changelog up to date

12 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Mon, 6 Feb 2012 17:39:09 +0000 (12:39 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

12 years agoLoop on filtering SSL reads until we are blocked or exhausted.
Nick Mathewson [Mon, 6 Feb 2012 17:24:49 +0000 (12:24 -0500)]
Loop on filtering SSL reads until we are blocked or exhausted.

This is not a perfect fix, but it's much much better than the
current buggy behavior, which could lead to filtering SSL
connections that just stopped reading.

Based on ideas by Maseeb Abdul Qadir and Mark Ellzey.

12 years agoReplace more C99/C++ comments with oldschool /* */ comments
Nick Mathewson [Thu, 2 Feb 2012 16:45:23 +0000 (11:45 -0500)]
Replace more C99/C++ comments with oldschool /* */ comments

12 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 2 Feb 2012 16:41:37 +0000 (11:41 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

12 years agoUse C-style comments in C source files (for compatibility with compilers such as...
Greg Hewgill [Sun, 20 Nov 2011 20:41:55 +0000 (09:41 +1300)]
Use C-style comments in C source files (for compatibility with compilers such as xlc on AIX).

12 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Wed, 1 Feb 2012 19:57:44 +0000 (14:57 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

12 years agoevdns: fix a bug in circular-queue implementation
Nick Mathewson [Wed, 1 Feb 2012 19:56:43 +0000 (14:56 -0500)]
evdns: fix a bug in circular-queue implementation

found by Wang Qin

12 years agoFix a compile warning in event_reinit
Sebastian Hahn [Tue, 31 Jan 2012 17:58:59 +0000 (18:58 +0100)]
Fix a compile warning in event_reinit

Introduced in 272033efe575a9dc7ec6f123a96afba5c69ff1c6

13 years agoRemove the eventqueue list and the ev_next pointers.
Nick Mathewson [Fri, 27 Jan 2012 21:35:04 +0000 (16:35 -0500)]
Remove the eventqueue list and the ev_next pointers.

Those pointers were once used to maintain a complete list of
inserted IO and signal events.  But such a list is now available by
walking over ev_io_map and ev_signal_map!  So all they did was
require extra pointer operations to maintain, and extra 8-16 bytes
of storage in each struct event.

To be cowardly and keep the option of going back to having this
redundancy, I'm wrapping the removed code in a set of ifdefs.

This is a first cut; it needs cleanups and stress-testing!!  In
particular, it just plain disables a couple of functions that could
probably be saved.

There seems to be a need for an evmap_{io,signal}_foreach() or something.

13 years agoMake test-changelist faster
Nick Mathewson [Fri, 27 Jan 2012 20:10:28 +0000 (15:10 -0500)]
Make test-changelist faster

13 years agoCheck changelist as part of checking representational integrity
Nick Mathewson [Fri, 27 Jan 2012 19:39:18 +0000 (14:39 -0500)]
Check changelist as part of checking representational integrity

13 years agoRestore fast-path event_reinit() for slower backends
Nick Mathewson [Fri, 27 Jan 2012 19:30:41 +0000 (14:30 -0500)]
Restore fast-path event_reinit() for slower backends

We used to use the needs_reinit flag in struct eventop to indicate
whether an event backend had shared state across a fork(), and
therefore would require us to construct a new event backend.  But
when we realized that the signal notification fds and the thread
notification fds would always be shared across forks, we stopped
looking at it.

This patch restores the old behavior so that poll, select, and
win32select don't need to do a linear scan over all pending
fds/signals when they do a reinit.  Their life is hard enough
already.

13 years agoMake event_reinit() more robust and maintainable
Nick Mathewson [Fri, 27 Jan 2012 18:54:05 +0000 (13:54 -0500)]
Make event_reinit() more robust and maintainable

Previously, event_reinit required a bunch of really dubious hacks,
and violated a lot of abstraction barriers to mess around with lists
of internal events and "pretend" to re-add them.

The new (and fairly well commented!) implementation tries to be much
smarter, by isolating the changes as much as possible to the backend
state, and minimizing the amount of abstraction violations.

Specifically, we now use event_del() to remove events we want to
remove, rather than futzing around with queues in event_reinit().
To avoid bogus calls to evsel->del(), we temporarily replace evsel
with a null-object stub.

Also, we now push the responsibility for calling evsel->add() down
into the evmap code, so that we don't actually need to unlink and
re-link all of our events.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 26 Jan 2012 21:56:33 +0000 (16:56 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoBetter workaround for Linux 3.2 edge-triggered epoll bug
Nick Mathewson [Thu, 26 Jan 2012 20:04:24 +0000 (15:04 -0500)]
Better workaround for Linux 3.2 edge-triggered epoll bug

On further investigation, it appears that this problem is limited to
AF_UNIX sockets, so let's just do the test on AF_INET sockets.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Tue, 24 Jan 2012 22:18:52 +0000 (17:18 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoDo a memberwise comparison of threading function tables
Nate R [Tue, 24 Jan 2012 22:15:50 +0000 (17:15 -0500)]
Do a memberwise comparison of threading function tables

Doing a memcmp risks comparing uninitialized padding bytes at the
end of the structure.

13 years agoWhen including an -internal.h header outside the main tree, do so early
Nick Mathewson [Tue, 24 Jan 2012 21:08:00 +0000 (16:08 -0500)]
When including an -internal.h header outside the main tree, do so early

Some of our unit tests and sample code need functions and structures
defined in an -internal.h header.  But that can freak out OpenSolaris,
where stdio.h wants to define _FILE_OFFSET_BITS unless it's already
defined, and then evconfig-internal.h defines it.  Regular users
should never ever use our -internal.h headers, so the solution is
to make sure that if we're going to use them ourselves, we do so
before system headers.

13 years agoAllow more slop in deferred_cb_skew test; freebsd needs it
Nick Mathewson [Tue, 24 Jan 2012 20:58:11 +0000 (15:58 -0500)]
Allow more slop in deferred_cb_skew test; freebsd needs it

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Tue, 24 Jan 2012 20:30:51 +0000 (15:30 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoRemove a couple of now-unused variables
Nick Mathewson [Tue, 24 Jan 2012 20:30:31 +0000 (15:30 -0500)]
Remove a couple of now-unused variables

13 years agoMake event_base integrity check work on windows
Nick Mathewson [Tue, 24 Jan 2012 20:29:39 +0000 (15:29 -0500)]
Make event_base integrity check work on windows

13 years agoStart writing a changelog for 2.0.17-stable
Nick Mathewson [Tue, 24 Jan 2012 20:09:04 +0000 (15:09 -0500)]
Start writing a changelog for 2.0.17-stable

13 years agoUse test_timeval_diff_eq more consistently
Nick Mathewson [Tue, 24 Jan 2012 19:59:37 +0000 (14:59 -0500)]
Use test_timeval_diff_eq more consistently

13 years agoMake regression tests run over 3x faster.
Nick Mathewson [Tue, 24 Jan 2012 19:33:10 +0000 (14:33 -0500)]
Make regression tests run over 3x faster.

This was mainly a matter of reducing timeouts and delays, paying
special attention to every test that took longer than a second to
finish.

We could do better here; IMO anything over .7 sec is probably too
long, but it's a big win as it is.

Remember, interactive computing is a big win over batch processing:
anything that makes you get up and walk away from the terminal might
as well be making you carry your punch cards over to the mainframe.

13 years agoNew evhttp function to adjust initial retry timeout
Nick Mathewson [Tue, 24 Jan 2012 19:34:04 +0000 (14:34 -0500)]
New evhttp function to adjust initial retry timeout

13 years agoReduce the timeout in the main/fork test.
Nick Mathewson [Tue, 24 Jan 2012 16:45:00 +0000 (11:45 -0500)]
Reduce the timeout in the main/fork test.

There was no reason for it to be so long, except for the lack of a usleep

13 years agoAdd an (internal) usleep function for use by unit tests
Nick Mathewson [Tue, 24 Jan 2012 16:42:26 +0000 (11:42 -0500)]
Add an (internal) usleep function for use by unit tests

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Tue, 24 Jan 2012 16:17:06 +0000 (11:17 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoOops:remove an accidentally committed "sleep(1)" in a unit test
Nick Mathewson [Tue, 24 Jan 2012 16:16:26 +0000 (11:16 -0500)]
Oops:remove an accidentally committed "sleep(1)" in a unit test

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Tue, 24 Jan 2012 16:04:56 +0000 (11:04 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoWorkaround in the unit tests for an apparent epoll bug in Linux 3.2
Nick Mathewson [Tue, 24 Jan 2012 16:04:19 +0000 (11:04 -0500)]
Workaround in the unit tests for an apparent epoll bug in Linux 3.2

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Tue, 24 Jan 2012 15:29:31 +0000 (10:29 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

Conflicts:
event.c

Edits required in:
        evmap.c

13 years agoFix a fd leak in event_reinit()
Nick Mathewson [Mon, 23 Jan 2012 23:15:44 +0000 (18:15 -0500)]
Fix a fd leak in event_reinit()

We were supposed to be closing the ev_signal_pair sockets.

13 years agoFix a list corruption bug when using event_reinit() with signals present
Nick Mathewson [Mon, 23 Jan 2012 22:59:16 +0000 (17:59 -0500)]
Fix a list corruption bug when using event_reinit() with signals present

While re-adding all the events, event_reinit() could add a signal
event, which could then cause evsig_add() to add the
base->sig.ev_signal event.  Later on its merry path through
base->eventqueue, event_reinit() would find that same event and give
it to event_io_add a second time.  This would make the ev_io_next
list for that fd become circular.  Ouch!

13 years agoCheck event_base correctness at end of each unit test
Nick Mathewson [Mon, 23 Jan 2012 22:43:35 +0000 (17:43 -0500)]
Check event_base correctness at end of each unit test

13 years agoFix compilation of windows evutil_check_ifaddrs
Nick Mathewson [Mon, 23 Jan 2012 03:27:16 +0000 (22:27 -0500)]
Fix compilation of windows evutil_check_ifaddrs

13 years agoAdd function to check referential integrity of an event_base
Nick Mathewson [Sat, 21 Jan 2012 17:55:15 +0000 (12:55 -0500)]
Add function to check referential integrity of an event_base

13 years agoMerge remote-tracking branch 'github/linked_list'
Nick Mathewson [Fri, 20 Jan 2012 21:31:20 +0000 (16:31 -0500)]
Merge remote-tracking branch 'github/linked_list'

Conflicts:
include/event2/event_struct.h

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Fri, 20 Jan 2012 16:40:39 +0000 (11:40 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoForce strict validation of HTTP version in response.
Catalin Patulea [Tue, 10 Jan 2012 23:33:58 +0000 (18:33 -0500)]
Force strict validation of HTTP version in response.

This sometimes accepted invalid versions like 'ICY' (n = 0, major = undefined, sometimes > 1).

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Mon, 16 Jan 2012 19:47:05 +0000 (14:47 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'