Nick Mathewson
2ed4430225
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.
2012-02-14 11:48:55 -05:00
Nick Mathewson
f088d0c52e
Fix up usage of reserved identifiers in ht-internal.h
2012-02-13 18:34:00 -05:00
Nick Mathewson
4900c5f96e
Port changes from Tor for ht-internal.h
2012-02-13 18:04:05 -05:00
Nick Mathewson
46e5bb7bdc
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.
2012-02-13 17:59:14 -05:00
Nick Mathewson
6c81be746c
Synchronize with upstream tinytest
2012-02-13 17:49:17 -05:00
Nick Mathewson
a9dc063ceb
Merge in a punctuation fix from upstream tinytest
2012-02-13 17:30:46 -05:00
Nick Mathewson
bbea8d6bc5
Move libevent 1.x headers to include/, to put all public headers in one place.
2012-02-13 12:45:07 -05:00
Nick Mathewson
2793197663
Merge remote-tracking branch 'origin/patches-2.0'
2012-02-11 21:20:47 -05:00
Nick Mathewson
03dce42dfa
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.
2012-02-11 21:17:18 -05:00
Ross Lagerwall
d2b5f7223a
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.
2012-02-11 21:10:22 -05:00
Nick Mathewson
a6503944dd
Add a bufferevent_getcb() to find a bufferevent's current callbacks
2012-02-11 12:04:15 -05:00
Nick Mathewson
bf2c5a7797
Also make win32select.c conditional for IDE users
2012-02-10 23:56:49 -05:00
Nick Mathewson
87a7cded02
Merge branch 'ifdef' of git://github.com/rosslagerwall/libevent
2012-02-10 23:52:27 -05:00
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
2b0a2c4519
Fix compilation on osx
2012-02-10 18:04:04 -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
bac906c761
Prefer epoll_create1 on Linuxen that have it
2012-02-10 16:39:46 -05:00
Nick Mathewson
33fca629a6
Save some syscalls when constructing a socket for a bufferevent
2012-02-10 16:33:25 -05:00
Nick Mathewson
713e570ab4
Save some syscalls when creating evdns sockets
2012-02-10 16:32:50 -05:00
Nick Mathewson
af6c9d8ee6
Save syscalls when constructing listener sockets for evhttp
2012-02-10 16:32:32 -05:00
Nick Mathewson
a35f396f28
Use pipes for telling signals to main thread when possible
2012-02-10 16:25:53 -05:00
Nick Mathewson
ca76cd931f
Use a wrapper function to create the notification pipe/socketpair/eventfd
2012-02-10 16:15:10 -05:00
Nick Mathewson
4970329a88
The LEV_OPT_CLOSE_ON_EXEC flag now applies to accepted listener sockets too
2012-02-10 16:14:09 -05:00
Nick Mathewson
7e9e289367
Minimize syscalls during socket creation in listener.c
2012-02-10 16:13:30 -05:00
Nick Mathewson
a1c042bfe9
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.
2012-02-10 16:11:47 -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
Ross Lagerwall
76d4c929d7
Put #ifdef around some files to support alternate build systems.
2012-02-08 18:46:00 +02: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
604569bf3f
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.
2012-01-27 16:35:04 -05:00