2479 Commits

Author SHA1 Message Date
Nick Mathewson
de69eb7ba9 Merge remote-tracking branch 'origin/patches-2.0' 2012-02-10 23:51:11 -05:00
Nick Mathewson
0c483170be Add an empty section to the changelog for 2.0.18-stable 2012-02-10 22:20:05 -05:00
Nick Mathewson
c5b6e46488 Merge remote-tracking branch 'origin/patches-2.0' 2012-02-10 22:18:19 -05:00
Nick Mathewson
5a807b7aa2 Correct a name in the credits. oops 2012-02-10 22:17:59 -05:00
Nick Mathewson
8fd7a243e8 Merge remote-tracking branch 'origin/patches-2.0' 2012-02-10 22:16:46 -05:00
Nick Mathewson
2d7bf0f78d Bump version to 2.0.17-stable-dev 2012-02-10 22:16:14 -05:00
Nick Mathewson
2d9154601e Merge remote-tracking branch 'origin/patches-2.0' 2012-02-10 18:50:17 -05:00
Nick Mathewson
83e58ccd30 Update the credits in the readme release-2.0.17-stable 2012-02-10 18:39:31 -05:00
Nick Mathewson
0cdbd642e3 Finalize the changelog 2012-02-10 18:36:10 -05:00
Nick Mathewson
539466e568 Merge remote-tracking branch 'origin/patches-2.0'
Conflicts:
	Makefile.am
	WIN32-Code/event2/event-config.h
	configure.in
2012-02-10 17:33:50 -05:00
Nick Mathewson
e49e289129 Update copyright notices to 2012 2012-02-10 17:29:53 -05:00
Nick Mathewson
8152b4c2b3 Bump version to 2.0.17-stable 2012-02-10 16:49:05 -05:00
Nick Mathewson
e465623a9c Merge remote-tracking branch 'origin/patches-2.0' 2012-02-10 12:05:39 -05:00
Nick Mathewson
5d7bfa1519 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.
2012-02-10 11:24:51 -05:00
Nick Mathewson
df19ba6a03 Merge remote-tracking branch 'origin/patches-2.0' 2012-02-09 15:16:02 -05:00
Nick Mathewson
19715a60e2 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
2012-02-09 15:07:19 -05:00
Nick Mathewson
6f6cebe356 Bring the changelog up to date 2012-02-06 21:18:25 -05:00
Nick Mathewson
c00416f745 Merge remote-tracking branch 'origin/patches-2.0' 2012-02-06 12:39:09 -05:00
Nick Mathewson
5b4b8126de 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.
2012-02-06 12:37:40 -05:00
Nick Mathewson
4dee4cc7e1 Replace more C99/C++ comments with oldschool /* */ comments 2012-02-02 11:45:23 -05:00
Nick Mathewson
7c46d4aa63 Merge remote-tracking branch 'origin/patches-2.0' 2012-02-02 11:41:37 -05:00
Greg Hewgill
d84d917099 Use C-style comments in C source files (for compatibility with compilers such as xlc on AIX). 2012-02-02 11:39:38 -05:00
Nick Mathewson
032aac156c Merge remote-tracking branch 'origin/patches-2.0' 2012-02-01 14:57:44 -05:00
Nick Mathewson
d6094b160f evdns: fix a bug in circular-queue implementation
found by Wang Qin
2012-02-01 14:56:43 -05:00
Sebastian Hahn
e4a56ed527 Fix a compile warning in event_reinit
Introduced in 272033efe575a9dc7ec6f123a96afba5c69ff1c6
2012-01-31 19:00:24 +01:00
Nick Mathewson
7622d2659b Make test-changelist faster 2012-01-27 15:10:28 -05:00
Nick Mathewson
39b3f38d72 Check changelist as part of checking representational integrity 2012-01-27 14:39:18 -05:00
Nick Mathewson
2c4b5de16a 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.
2012-01-27 14:30:41 -05:00
Nick Mathewson
272033efe5 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.
2012-01-27 13:54:05 -05:00
Nick Mathewson
4b7baec668 Merge remote-tracking branch 'origin/patches-2.0' 2012-01-26 16:56:33 -05:00
Nick Mathewson
9f9e259fda 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.
2012-01-26 15:04:24 -05:00
Nick Mathewson
2c6b3246fd Merge remote-tracking branch 'origin/patches-2.0' 2012-01-24 17:18:52 -05:00
Nate R
c94a5f2a2c Do a memberwise comparison of threading function tables
Doing a memcmp risks comparing uninitialized padding bytes at the
end of the structure.
2012-01-24 17:15:50 -05:00
Nick Mathewson
95e2455cdb 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.
2012-01-24 16:08:00 -05:00
Nick Mathewson
b9f7e5fd19 Allow more slop in deferred_cb_skew test; freebsd needs it 2012-01-24 15:58:11 -05:00
Nick Mathewson
ea30a4358c Merge remote-tracking branch 'origin/patches-2.0' 2012-01-24 15:30:51 -05:00
Nick Mathewson
3aa0e8a905 Remove a couple of now-unused variables 2012-01-24 15:30:31 -05:00
Nick Mathewson
438d4ff2bd Make event_base integrity check work on windows 2012-01-24 15:29:39 -05:00
Nick Mathewson
edc6d7d7fa Start writing a changelog for 2.0.17-stable 2012-01-24 15:09:04 -05:00
Nick Mathewson
b77b43fcdf Use test_timeval_diff_eq more consistently 2012-01-24 14:59:37 -05:00
Nick Mathewson
67a1763bc4 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.
2012-01-24 14:48:04 -05:00
Nick Mathewson
350a3c400f New evhttp function to adjust initial retry timeout 2012-01-24 14:48:02 -05:00
Nick Mathewson
ab14f7c140 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
2012-01-24 14:47:30 -05:00
Nick Mathewson
f25d9d32b1 Add an (internal) usleep function for use by unit tests 2012-01-24 11:42:26 -05:00
Nick Mathewson
18653fcae7 Merge remote-tracking branch 'origin/patches-2.0' 2012-01-24 11:17:06 -05:00
Nick Mathewson
5408ff3b89 Oops:remove an accidentally committed "sleep(1)" in a unit test 2012-01-24 11:16:26 -05:00
Nick Mathewson
10996a1a0b Merge remote-tracking branch 'origin/patches-2.0' 2012-01-24 11:04:56 -05:00
Nick Mathewson
dab91877bc Workaround in the unit tests for an apparent epoll bug in Linux 3.2 2012-01-24 11:04:19 -05:00
Nick Mathewson
fe0afabb59 Merge remote-tracking branch 'origin/patches-2.0'
Conflicts:
	event.c

Edits required in:
        evmap.c
2012-01-24 10:29:31 -05:00
Nick Mathewson
3f18ad1b5f Fix a fd leak in event_reinit()
We were supposed to be closing the ev_signal_pair sockets.
2012-01-23 18:15:44 -05:00