Branch :
| Author | Commit | Date | CI | Message |
|---|---|---|---|---|
| 2447fe88 | 2010-08-28 04:07:48 | Add event_config_set_num_cpus_hint for tuning thread pools, etc. | ||
| 499452f4 | 2010-08-28 02:44:11 | IOCP-related unit test tweaks | ||
| 76f7e7ae | 2010-08-17 05:02:00 | Some IOCP bufferevent tweaks. - Increment reference count of bufferevents before initiating overlapped operations to prevent the destructor from being called while operations are pending. The only portable way of canceling overlapped ops is to close the socket. - Translate error codes to WSA* codes. - Better handling of errors. - Add an interface to add and del "virtual" events. Because IOCP bufferevents don't register any events with the base, the event loop has no way of knowing they exist. This causes the loop to terminate prematurely. event_base_{add,del}_virtual increment/decrement base's event count so the loop runs while there are any enabled IOCP bufferevents. | ||
| d844242f | 2010-08-28 02:08:27 | Stop IOCP when freeing the event_base. | ||
| 03afa209 | 2010-08-16 01:23:57 | IOCP-related evbuffer fixes. - Prevent evbuffer_{add,prepend}_buffer from moving read-pinned chains. - Fix evbuffer_drain to handle read-pinned chains better. - Raise the limit on WSABUFs from two to MAX_WSABUFS for overlapped reads. | ||
| 42090072 | 2010-09-06 15:47:07 | Move the "function to getsockname() on a listener" to regress_testutils This reverts commit fab50488fcb741884ccdfa7b83643eac3e5c9cbf. The function was, on reflection, not important enough to break the feature freeze, since it's trivial to build on your own. | ||
| c51826ff | 2010-09-06 15:40:13 | Merge remote branch 'github/sysqueue_include_order' | ||
| b0f284cb | 2010-09-06 10:10:17 | Fix event_del(0) instance in bench.c | ||
| 749128b2 | 2010-09-04 22:02:32 | Merge remote branch 'github/win32_posix_underscore' | ||
| 150599e6 | 2010-09-04 22:00:38 | Merge remote branch 'github/cdecl' | ||
| b5dd8064 | 2010-09-03 22:00:25 | Fix uninitialized port var in http_delete_test. Last one, I hope. | ||
| 3b3fb743 | 2010-09-03 21:03:25 | Fix uninitialized variables in http_bad_request_test. (oops) | ||
| a97320ac | 2010-09-03 18:48:31 | Allow more than one copy of regression tests to run at once Mostly this was a matter of just removing all the hardwired ports in the test code. The http/connection_retry test is still a little screwy, though. | ||
| 19521436 | 2010-09-03 16:42:16 | Expose a function to add a nameserver by sockaddr | ||
| fab50488 | 2010-09-03 16:41:16 | Expose a function to getsockname() on a listener's fd. | ||
| 7ea8e89d | 2010-09-03 15:12:35 | Prefer autoreconf -ivf to manual autogen.sh Suggested by Ralph Castain | ||
| 47882773 | 2010-09-02 13:21:17 | Fix pointer-to-__cdecl-function syntax | ||
| e50c0fcc | 2010-09-02 11:10:50 | Use the _func() replacements for open, fstat, etc in evutil.c on win32 Remember that in a fit of ANSI C compliance, Microsoft decided to screw portability by renaming basically all the functions in unistd.h to get prefixed with an understore. For some reason, mingw didn't seem to mind, but at least some people's compilers did: see bug 3044490. | ||
| f0056d04 | 2010-09-02 12:06:58 | Declare signal handler function as "__cdecl" on Windows. I swear, they must have half a dozen different calling conventions. (goes to check) Holy crud. They actually do. There's __cdecl, __stdcall, __fastcall, "thiscall", "naked" and the obsolete "__pascal", "__fortran", and "__syscall". And don't forget WINAPI and __far. Anyways, this should fix 3044488 if I got it right. | ||
| ca9048f1 | 2010-09-02 11:36:44 | Move evkeyvalq into a separate header for evhttp_parse_query users The evhttp_parse_query API is a bit misdesigned; all the other evkeyvalq stuff is abstract and lets you get away with having a header stub, but evhttp_parse_query seems to require that you instantiate an empty evkeyvalq of your own. | ||
| d3ceca80 | 2010-09-02 11:27:57 | Declare evkeyvalq and event_list even if event_struct.h comes before sys/queue.h Fixes bug 3036645 reported by Mihai Draghicioiu | ||
| acc4aca4 | 2010-08-30 11:35:06 | Fix a bug in our win32 condition implementation The do ... while loop in our wait code could spin while waiting because the event object wasn't reset until there were no longer any events waiting to be woken up. We also want to reset the event object if the count of events to wake up reaches zero. Found by Chris Davis. Fixes bug 3053358. | ||
| d61b2f33 | 2010-08-26 15:09:58 | Fix an issue with forking and signal socketpairs in select/poll backends Nicholas Marriott identifies an issue where a signal socketpair doesn't get recreated if the event backend doesn't set event_reinit. See bug 3048812 There may be a similar issue with respect to th_notify_fd | ||
| 041989fb | 2010-08-17 14:44:12 | Rename regress_pthread.c to regress_thread.c | ||
| f1074b77 | 2010-08-23 12:01:45 | Detect events with no ev_base; warn instead of crashing | ||
| 743f8665 | 2010-08-23 11:48:46 | Honor NDEBUG; build without warnings with NDEBUG; make NDEBUG always-off in unit test code | ||
| 970e6ad2 | 2010-08-19 14:00:06 | Avoid deadlock when activating signals. Fixes bug 3048812. Based on patch by Nicholas Marriott. | ||
| 6123d129 | 2010-08-19 09:38:44 | Fix kquue correctness test on x84_64 Apparently, in our configure.in check for a working kqueue, we were leaving some fields unset that seemed to irritate 64-bit kqueue a lot. Found by Christopher Layne | ||
| 4c32b9de | 2010-08-18 12:02:25 | Fix logic error in win32 TRY_LOCK that caused problems with rate-limiting | ||
| d0b88433 | 2010-08-18 10:49:12 | Set close-on-exec bit for filedescriptors created by dns subsystem. Based on patch for 1.4 by Ralf Schmitt. | ||
| da6e7cd4 | 2010-08-17 13:26:03 | Correctly detect failure to delete bufferevent read-timeout event Gilad Benjamini noted that we check the error code for deleting a write-timeout event twice, and the read timeout not at all. This shouldn't be a bit problem, since it's really hard for a delete to fail on a timeout-only event, but it's worth fixing. Fixes bug 3046787 | ||
| 5fb10958 | 2010-08-16 22:55:45 | Add a unit test for conditions | ||
| d74ae381 | 2010-08-16 12:38:22 | Make the regress_pthread.c tests work on windows with current test APIs | ||
| e0972c21 | 2010-08-17 13:18:18 | Use conditions instead of current_event_lock to fix a deadlock. Avi Bab correctly noted as bug 3044479 the fact that any thread blocking on current_event_lock will do so while holding th_base_lock, making it impossible for the currently running event's callback to call any other functions that require th_base_lock. This patch switches the current_event_lock code to instead use a condition variable that we wait on if we're trying to mess with a currently-executing event, and that we signal when we're done executing a callback if anybody is waiting on it. | ||
| d4977b52 | 2010-08-17 13:15:34 | Add a condition variable backend, with implementations for pthreads and win32 The interface from the user's POV is similar to the locking implementation: either provide a structure full of function pointers, or just call evthread_use_*_threads() and everything will be okay. The internal interface is meant to vaguely resemble pthread_cond_*, which Windows people will better recognize as *ConditionVariable*. | ||
| 39201728 | 2010-08-13 17:19:18 | Make definition of WIN32_LEAN_AND_MEAN in event.h conditional. (Inclusion order might trigger a warning for redefinition on Windows.) | ||
| 60433a0a | 2010-08-13 17:08:59 | Clean up syntax on TAILQ_ENTRY() usage Though the C standards allow it, it's apparently possible to get MSVC upset by saying "struct { int field; } (declarator);" instead of "struct {int field; } declarator;", so let's just not do that. Bugfix for 3044492 (commit msg by nickm) | ||
| a4af9be1 | 2010-08-13 11:41:37 | Make include/event2/event-config.h not included in source dist As a generated file, it shouldn't get included in our source distribution. Apparently there is an automake incant for this: nobase_ even stacks with nodist_ . | ||
| 4022b287 | 2010-08-13 11:34:39 | Change include order in Makefile.nmake If there is an event-config.h in include/event2 (either because we screwed up packaging like in 2.0.6-rc or because we previously tried building with mingw and we didn't make distclean in the middle), we want MSVC to find the one one in WIN32-Code/include/event2 first. Found by Gilad Benjamini. | ||
| 4991669b | 2010-08-10 21:05:52 | Update the whatsnew-2.0.txt document | ||
| 33200e72 | 2010-08-10 15:03:14 | Document that DNS_NO_SEARCH is an obsolete alias for DNS_QUERY_NO_SEARCH | ||
| 3808168d | 2010-08-10 15:02:50 | Completely remove the (mostly-removed) obsolete thread functions. | ||
| 9b5c19ac | 2010-08-10 11:46:00 | Merge branch 'more_pkgconfig' | ||
| ebcb1f03 | 2010-08-10 11:11:25 | Add pkgconfig files for libevent_{openssl,pthreads} | ||
| 0bffe43a | 2010-08-09 12:08:40 | Fix a nasty dangling-event bug when using rate-limiting groups When we freed a bufferevent that was in a rate-limiting group and blocked on IO, the process of freeing it caused it to get removed from the group. But removing the bufferevent from the group made its limits get removed, which could make it get un-suspended and in turn cause its events to get re-added. Since we would then immediately _free_ the events, this would result in dangling pointers. Fixes bug 3041007. | ||
| ff481a8e | 2010-08-06 23:22:01 | Increment vesion to 2.0.6-rc-dev | ||
| 556d0f40 | 2010-08-06 21:19:44 | Increment versions to 2.0.6-rc | ||
| f6582640 | 2010-08-06 21:11:01 | Changlog and new acknowledgements for 2.0.6-rc | ||
| ec347b92 | 2010-07-07 16:45:03 | Move event-config.h to include/event2 This change means that all required include files are in event2, and all files not in event2/* are optional. | ||
| 5fa30d2b | 2010-08-06 17:13:27 | Fix evdns build with -DUNICODE It turns out that GetProcAddress always takes its second argument as a C string, regardless of whether unicode is on or not. | ||
| 28f31a4f | 2010-08-06 16:36:23 | Fix unit tests with -DUSE_DEBUG enabled If you were to enable USE_DEBUG and slog through all 700+ MB of debugging output, you'd find that one of the unit tests failed, since it tested the debug logging code, but the string it expected and the string it logged differed by a tab vs 2 spaces. | ||
| ea1ea3d6 | 2010-08-06 13:34:51 | Make test-changelist count cpu usage right on win32 | ||
| 9b602096 | 2010-08-06 13:03:17 | Use AF_INET socketpair to test sendfile on Solaris | ||
| 57b30cd7 | 2010-08-06 13:01:32 | Turn our socketpair() replacement into its own function This patch splits the formerly windows-only case of evutil_socketpair() into an (internal-use-only) function named evutil_ersatz_socketpair(), and makes it build and work right on non-Windows hosts. We need this for convenience to test sendfile on solaris, where socketpair can't give you an AF_INET pair, and sendfile() won't work on AF_UNIX. | ||
| de1f5d6d | 2010-08-06 09:33:55 | Remember to initialize timeout events for bufferevent_async Fixes segfaults in unit tests. | ||
| 170ffd2b | 2010-08-05 15:57:30 | Increase the tolerance in our unit tests for sloppy clocks. (Apparently openbsd in virtualbox just doesn't keep very accurate time.) | ||
| e996b3d4 | 2010-08-05 15:51:16 | Make tests quieter on local dns resolver failure | ||
| 4558ce23 | 2010-08-04 17:31:28 | Merge branch 'openssl_ratelim' | ||
| b2c6202d | 2010-08-04 15:52:32 | Fix an assertion bug in test-ratelim If the rate limit was low enough, then the echo_conns wouldn't finish inside the 300 msec we allowed for them to close. Instead, count the number of connections we have, and keep waiting until they are all closed. | ||
| 42f6b624 | 2010-08-04 15:51:14 | Add option to test-ratelim to test min_share | ||
| 6ae53d67 | 2010-08-04 15:44:08 | Add an interface to expose min_share in ratelimiting groups | ||
| 009f3005 | 2010-08-04 14:54:38 | Fix rate-limit calculation on openssl bufferevents. When you're doing rate limiting on an openssl connection, you nearly always want to limit the number of bytes sent and received over the wire, not the number of bytes read or written over the secure transport. | ||
| 13b912e4 | 2010-08-01 21:39:48 | Fixed compilation of sample/le-proxy.c on win32 | ||
| 42a8c711 | 2010-07-31 17:10:04 | Build more cleanly with NetBSDs that dislike toupper(char) To be fair, when char can be signed, if toupper doesn't take negative characters, toupper(char) is a very bad idea. So let's just use the nice safe EVUTIL_TOUPPER instead. (It explicitly only upcases ASCII, but we only use it for identifiers that we know to be ASCII anyway). | ||
| 840a72fb | 2010-07-29 20:32:40 | Fix badly-behaved subtest of dns/bufferevent_connect_hostname The bufferevent_connect_hostname test was specifying AF_INET, but the gethostbyname test we were using to see what error to expect was using PF_UNSPEC, leading to possible divergence of results. | ||
| 9e725f72 | 2010-07-29 18:12:05 | Improve error message for failed epoll to make debugging easier. | ||
| cc2379d2 | 2010-07-26 14:48:32 | Constify a couple of arguments to evdns_server_request_add_*_reply | ||
| e1c1167c | 2010-07-22 14:38:08 | Replace (unused,always 0) is_tcp argument to evdns_add_server_port*() with flags Since we weren't using it for anything, and we always failed if it was set, we're allowed to change the future semantics of setting it. | ||
| 7e87a599 | 2010-07-21 14:33:42 | Stop asserting when asked for a (unsupported) TCP dns port. Just return NULL. | ||
| c9913174 | 2010-07-19 15:31:19 | Change bufferevent_openssl::do_write so it doesn't call SSL_write with a 0 length buffer I was running into a problem when using bufferevent_openssl with a very simple echo server. My server simply bufferevent_read_buffer 'd data into an evbuffer and then passed that evbuffer straight to bufferevent_write_buffer. The problem was every now and again the write would fail for no apparent reason. I tracked it down to SSL_write being called with the amount of data to send being 0. This patch alters do_write in bufferevent_openssl so that it skips io_vecs with 0 length. | ||
| 7c926916 | 2010-07-19 15:14:10 | Make test/test.sh call test-changelist Eventually test-changelist should expand to try more cases, maybe query the status of the actual changelist somehow, and integrate it with the rest of the unit tests. Also, add test-changelist to gitignore. | ||
| cb927a51 | 2010-07-19 15:03:43 | Fix whitespace. | ||
| b00d4c04 | 2010-07-19 14:58:08 | Remove unused variables in test/test-changelist.c | ||
| cf249e7d | 2010-07-19 13:44:56 | Possible fix to 100% cpu usage with epoll and openssl I'm running a fairly simple bit of test code using libevent2 with epoll and openssl bufferevents and I've run into a 100% cpu usage problem. Looking into it 100% usage was caused by epoll_wait constantly returning write events on the openssl socket when it shouldn't really have been looking for write events at all (N_ACTIVE_CALLBACKS() was returning 0 also). Looking a bit deeper eventbuffer_openssl socket seems to be requesting that the EV_WRITE event be removed when it should, but the event isn't actually being removed from epoll. Continuing to follow this I think I've found a bug in event_changelist_del. For evpoll event_del calls event_changelist_del which caches the change which is then actioned later when evpoll_dispatch is called. In event_changlist_del there is a check so that if the currently changed action is an add then the cached action is changed to a no-op rather than a delete (which makes sense). The problem arises if there are more than two add or delete operations between calls to dispatch, in this case it's possible that the delete is turned into a no-op when it shouldn't have been. For example starting with the event on, a delete followed by an add and then another delete results in a no-op when it should have been a delete (I added a fair bit of debug output that seems to confirm this behaviour). I've applied a small change that checks the original old_event stored with the change and only converts the delete to a no-op if the event isn't on in old_event. This seems to have fixed my problem. | ||
| 928b7d49 | 2010-07-16 12:38:23 | Merge branch 'pncalls_fix' | ||
| 65abdc20 | 2010-07-16 09:11:09 | Fix wrong sie calculation of iovec buffers when exact=1 The old code had a bug where the 'exact' flag to 1 in _evbuffer_read_setup_vecs would never actually make the iov_len field of the last iovec get truncated. This patch fixes that. | ||
| 7c2dea16 | 2010-07-13 11:06:08 | Pass flags to fcntl(F_SETFL) and fcntl(F_SETFD) as int, not long Everybody but Linux documents this as taking an int, and Linux is very tolerant of getting an int instead. If it weren't, everybody doing fcntl(fd,F_SETFL,O_NONBLOCK) would break, since the glibc headers define O_NONBLOCK as an int literal. | ||
| e73cbde1 | 2010-07-08 14:41:02 | Suppress a spurious EPERM warning in epoll.c It's okay for us to get an EPERM when doing an EPOLL_DEL on an fd; it just means that before we got a chance to the EPOLL_DEL, we closed the fd and reopened a new non-socket that wound up having the same fd. Partial fix for Bug 3019973. | ||
| fc5e0a23 | 2010-07-05 14:39:39 | Don't race when calling event_active/event_add on a running signal event There was previously no lock protecting the signal event's ev_ncalls/ev_pncalls fields, which were accessed by all of event_signal_closure, event_add_internal, event_del_internal, and event_active_nolock. This patch fixes this race by using the current_event_lock in the same way it's used to prevent event_del_internal from touching an event that's currently running. | ||
| 61e1eeec | 2010-07-05 13:24:45 | Tidy up the code in evthread_make_base_notifiable a little Previously, we had a few conditional statements with the "if (...)" inside an #ifdef and the body outside. That kind of thing is hard to read. | ||
| a5bc15b2 | 2010-07-05 13:24:12 | Drain th_notify_fd[0] more bytes at a time. | ||
| 17522d2a | 2010-07-05 13:17:47 | Fix a deadlock related to event-base notification. Diagnosed by Zhou Li, Avi Bab, and Scott Lamb. The problem was that the thread doing the notification could block on write in evthread_notify_base_default while holding the th_base_lock. The main thread would never drain th_notify_fd[0], since it would need th_base_lock to actually trigger events. | ||
| d89fdba4 | 2010-07-05 12:28:22 | Make sample/hello_world work on windows We forgot to include the WSAStartup call in main(). Patch from an anonymous user on Sourceforge. Fixes bug 3025354. | ||
| 08598709 | 2010-07-05 12:26:21 | never let bufferevent_rlim functions return negative | ||
| 14250031 | 2010-06-23 01:15:15 | Really only add libevent_core.la to LIBADD on mingw Commit fdc629736e1 tried to do this, but added it for mingw and for everything else. Fixes a segfault in bufferevent unittests. | ||
| 215e629c | 2010-06-21 12:26:21 | Add bufferevent_lock()/bufferevent_unlock() Although bufferevent operations are threadsafe, sometimes you need to make sure that a few operations on a single bufferevent will all be executed with nothing intervening. That's what these functions are for. | ||
| 7b259b67 | 2010-06-21 12:24:49 | Fix sentence fragment in docs for event_get_struct_event_size() | ||
| 7510aac3 | 2010-06-21 12:23:32 | Unit test for event_get_struct_event_size() | ||
| 9659eced | 2010-06-19 18:23:16 | Add a comment to describe our plan for library versioning | ||
| b2d7440a | 2010-06-19 18:22:48 | Set library version for libevent_pthreads correctly | ||
| e21f5d15 | 2010-06-19 18:21:40 | Document a change in the semantics of event_get_struct_event_size() | ||
| 8a440623 | 2010-06-17 10:33:06 | Have autogen.sh pass --force-missing to automake Previously, our autogen.sh script wouldn't tell automake to update older versions of its copied-in scripts, which would cause problems if they got sufficiently out-of-date. | ||
| 9b149116 | 2010-06-17 10:31:35 | Remove some automake-generated files from version control. | ||
| 276e7ee9 | 2010-06-11 11:57:13 | Fix a pedantic gcc 4.4 warning in event2/event.h | ||
| 29b2e233 | 2010-05-30 03:17:48 | Fix possible nullptr dereference in evhttp_send_reply_end() (The existing implementation had sanity-checking code for the case where its argument was NULL, but it erroneously dereferenced it before actually doing the sanity-check. --nickm) | ||
| 17a8e2d7 | 2010-06-07 12:06:43 | Add a function to retrieve the other side of a bufferevent pair | ||
| 44d57eee | 2010-06-03 11:25:54 | Add test for behavior on remote socket close On all the backends on this little mac laptop, that behavior is to report a remote socket close as both EV_READ and EV_WRITE. Historically, we had problem for some of these behaviors on some backends, so let's make sure that such behaviors don't come back. | ||
| 3467f2fa | 2010-05-28 15:05:32 | Fix logic in correcting high values from FIONREAD The old logic made sense back when buffer.c was an enormous linear buffer, but it doesn't make any sense for the chain-based implementation. This patch also refactors the ioctl{socket}? call into its own function. | ||
| 0798dd12 | 2010-05-27 22:37:09 | Close the file in evutil_read_file whether there's an error or not. evutil_read_file would close the file if there was an error, but not if things went normally. | ||
| c21c6631 | 2010-05-27 01:32:11 | Add the libtool-generated /m4/* stuff to .gitignore |