libevent Changelog

What's new in libevent 2.1.4 Alpha

Mar 22, 2014
  • Several new utility APIs in libevent core, bufferevents, and evhttp.
  • Detect closes early with EPOLLRDHUP.
  • (Optional) support for buildint with cmake.
  • Bug fixes too numerous to mention.

New in libevent 2.1.3 Alpha (May 2, 2013)

  • Highlights:
  • New finalization API with fix for bufferevent deadlock issue.
  • New evdns and evhttp option.
  • Several new unit tests.
  • Bugfixes and portability fixes and build fixes too numerous to mention.
  • Core (event finalization):
  • Implement event_finalize() and related functions to avoid certain deadlocks (8eedeab)
  • Use finalization feature so bufferevents can avoid deadlocks (02fbf68)
  • Always run pending finalizers when event_base_free() is called (e9ebef8)
  • Remove bufferevent_del_generic_timeout_cbs as now unused (4ea4c6a)
  • More documentation for finalization feature (a800b91)
  • Make the event_finalize* functions return an error code (5d11f4f)
  • Mark the finalize stuff as experiemental in case it needs to change (23e2e29)
  • Evdns:
  • evdns: New flag to make evdns not prevent the event loop from exiting (6b7fa62 Azat Khuzhin)
  • Bugfixes (Core):
  • Make event_remove_timer behave correctly with persistent timers (5623e80)
  • Unit test for event_remove_timer with EV_PERSIST. (96150dd)
  • Double-check next timeout when adding events (9443868 Nate Rosenblum)
  • event_base_update_cache_time should be a no-op if the loop isn't running (5e6fa2a)
  • Bugfixes (evhttp, crash fix, from 2.0):
  • fix #73 and fix http_connection_fail_test to catch it (b618204 Greg Hazel)
  • Bugfixes (compilation and portability, from 2.0):
  • Fix compilation with WIN32_HAVE_CONDITION_VARIABLES enabled (7e45739)
  • Fix missing AC_PROG_SED on older Autoconfs (9ab2b3f Tay Ray Chuan)
  • Backport libevent to vanilla Autoconf 2.59 (as used in RHEL5) (74d4c44 Kevin Bowling)
  • Use AC_CONFIG_HEADERS in place of AM_CONFIG_HEADERS for autmake 1.13 compat (817ea36)
  • Rename configure.in to configure.ac to appease newer autoconfs (0c79787)
  • Avoid using top_srcdir in TESTS: new automakes do not like this (a55514e)
  • Bugfixes (resource leaks/lock errors on error, from 2.0):
  • Avoid leaking fds on evconnlistener with no callback set (69db261)
  • Avoid double-close on getsockname error in evutil_ersatz_socketpair (0a822a6)
  • Fix a locking error in bufferevent_socket_get_dns_error. (0a5eb2e)
  • Documentation Fixes (from 2.0):
  • Fix a mistake in evbuffer_remove() arguments in example http server code (c322c20 Gyepi Sam)
  • Fix a typo in a comment in buffer.h. Spotted by Alt_F4 (773b0a5)
  • Documentation Fixes:
  • minor documentation typos (809586a Patrick Pelletier)
  • Fix cut-and-paste err in whatsnew-2.1 (49905ac)
  • Fix comment to refer to sample/include.am correctly (9e8cdf3 Sebastian Hahn)
  • Fix typo : Dispatching instead of Dispaching (0c2bacc Volker Lendecke)
  • fix some hinky indentation in evhttp_make_request (80e220e Patrick Pelletier)
  • "buffer" spelling (a452811 Patrick Pelletier)
  • Specify return behavior in header for evbuffer_pullup() in corner case (cf8d1cd Dan Petro)
  • Clarify an important point about event_base_foreach_event() (920a5e6)
  • Compilation Fixes/Tool Support:
  • avoid valgrind false positive by zeroing epoll_event (1258614 Patrick Pelletier)
  • Fix harmless clang enum warning (b452a43 Sebastian Hahn)
  • remove all exes on "make clean", not just regress.exe (974bfa0 Patrick Pelletier)
  • Make --disable-libevent-regress work again (787fd74)
  • Do not build strlcpy.c when it will have no code. (4914620)
  • Portability Fixes:
  • When EWOULDBLOCK is not EAGAIN, treat it as equivalent to it (bf7a0ff)
  • Preliminary changes for Minix3. (0dda56a Nicholas Heath)
  • Use AC_CONFIG_HEADERS in place of AM_CONFIG_HEADERS for autmake 1.13 compat (bf278b)
  • Avoid using $(top_srcdir) in TESTS. (2863c83)
  • build test/test-script.sh on systems with a less-featureful $< (f935e21)
  • Implement EVUTIL_ERR_IS_EAGAIN on windows. (42aaf4d)
  • Evhttp changes:
  • Fix ipv6 support for http. When URL contain domain, not IP address. (71e709c Azat Khuzhin)
  • uri decode: fix for warning "use of uninitialised value" (64b6ece Azat Khuzhin)
  • uri decode: changed the test for the existence of the next character (e1903e3 Azat Khuzhin)
  • Move prototype of evhttp_decode_uri_internal() to http-internal.h (de8101a Azat Khuzhin)
  • Test: decoding just part of string with evhttp_decode_uri_internal() (1367653 Azat Khuzhin)
  • Add new error_cb for actual reporting of HTTP request errors. (7b07719 Azat Khuzhin)
  • Add test for EVREQ_HTTP_REQUEST_CANCEL into http_cancel_test() (862c217 Azat Khuzhin)
  • Drop extra header http_struct.h from regress_http.c (54cc800 Azat Khuzhin)
  • Testing:
  • Add regress test ipv6_for_domain. (9ec88bd Azat Khuzhin)
  • Add an environment variable (EVENT_DEBUG_MODE) to run unit tests in debug mode (2fad0f3)
  • Add a test with an active_later event at event_base_free time. (1c3147f)
  • Make all tests pass under EVENT_DEBUG_MODE=1 (b1b054f)
  • Add some verbose notes to bufferevent unit tests (9d893c9)
  • New test for active_later->active transition on event_active (a153874)
  • New tests for event_base_foreach_event() (0b096ef)
  • Unit tests for event_base_gettimeofday_cached() and event_base_update_cache_time() (30ea291)
  • A test for event_get_assignment() (f09629e)
  • More unit tests for initializing common timeouts. (d596739)
  • Fix a bug in the new main/event_foreach test (702c9aa)
  • Examples (http):
  • Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl. (be46c99 Catalin Patulea)
  • use ${OPENSSL_LIBS} instead of -lssl -lcrypto (bf31fa5 Patrick Pelletier)
  • https-client was putting newlines at 256-byte boundaries (42d7441 Patrick Pelletier)
  • better handling of OpenSSL errors (5754d96 Patrick Pelletier)
  • use Debian's default root certificate location (aacd674 Patrick Pelletier)
  • use iSECPartners code to validate hostname in certificate (64d9f16 Patrick Pelletier)
  • avoid sign mismatch warning in openssl_hostname_validation.c (6021cb5 Patrick Pelletier)
  • pull in wildcard matching code from cURL (4db9da6 Patrick Pelletier)
  • Another tweak to https-client.c (95acdaa)
  • Remove http_struct.h usage in sample/https-client.c (8a90a85)

New in libevent 2.1.2 Alpha (Apr 17, 2013)

  • Performance (core):
  • Replace pipe-based notification with EVFILT_USER where possible. Thisshould make multithreaded programs on OSX and *BSD alert the main thread alittle faster. (53a07fe)
  • Make th_base_lock nonrecursive. (9cd5acb)
  • New/Changed API Functions:
  • New event_get_priority() function to return an event's priority (f90e255)
  • Add a bufferevent_get_priority() function (bd39554)
  • Add an event_base_loopcontinue() to tell Libevent to rescan for moreevents right away (7d6aa5e)
  • Add a new callback to get called on evbuffer_file_segment free(e9f8feb yangacer, 64051b9)
  • Expose event_base_foreach_event() as a public API. (84fd6d7 Roman Puls, 232055e, ffe1643)
  • Add an event_remove_timer() to remove timer on an event withoutdeleting it (e3b2e08)
  • Make bufferevent_set_timeouts(bev, NULL, NULL) have plausiblesemantics (9dee36b)
  • Rename event_enable_lock_debuging() to ..._debugging(). (The old nameshould still work.) (07e132e)
  • Add missing implementation for event_enable_debug_logging (3b3e21d)
  • PORTABLE MONOTONIC TIMERS:
  • Libevent 2.1.2 includes internal support for monotonic timers on (nearly) all supported platforms, including Windows, and OSX. Libevent applications should now be more resilient to jumps forwards or backwards in the system clock. Also, on Linux systems with epoll, we now optionally support microsecond-level timeouts (whereas epoll only supports millisecond-precision timeouts).
  • Use mach_absolute_time() for monotonic clock support on OSX. (b8fd6f9)
  • Do not track use_monotonic field when is no monotonic clock (cb653a0)
  • EVENT_BASE_FLAG_PRECISE_TIMER indicates we want fine timer precision(ddd69d3)
  • On Linux, use CLOCK_MONOTONIC_COARSE by default (55780a7)
  • Implement a GetTickCount-based monotonic timer for Windows (d5e1d5a)
  • Refactor monotonic timer handling into a new type and set offunctions; add a gettimeofday-based ratcheting implementation (f5e4eb0)
  • Add EVENT_PRECISE_TIMER environment var for selecting precise-but-slowtimer (a2598ec)
  • Implement fast/precise monotonic clocks on Windows (2c47045)
  • Simple unit tests for monotonic timers (630f077)
  • Improve the monotonic-time unit test: make it check the step size (7428c78)
  • When PRECISE_TIMERS is set with epoll, use timerfd for microsecondprecision (26c7582)
  • Split out time-related evutil functions into a new evutil_time.c (c419485)
  • Split out time-related prototypes into time-internal.h (71bca50)
  • Add evutil_time.obj to Makefile.nmake (0ba0683)
  • Avoid giving a spurious warning when timerfd support is unavailable(1aaf9f0 Dave Hart)
  • Make test_evutil_monotonic a little more tolerant (def3b83)
  • Avoid unused-var warning on systems with clock_gettime but withoutCLOCK_MONOTONIC_COARSE (9be5468)
  • EVENT_BASE_ONCE LEAKS: If a callback added by event_base_once() is never invoked, Libevent no longer leaks internal memory.
  • Free dangling event_once objects on event_base_free() (c17dd59)
  • Add a unit test in which an event is created with event_base_once()but never fires (4343edf)
  • TESTING SUPPORT, FIXES AND IMPROVEMENTS:
  • Libevent now disables by default its unit tests that would touch the network, or that tend to fail on heavily-loaded systems. To re-enable them, invoke the ./test/regress program with the @all alias.
  • Simplify test.sh code significantly. (9b856fd Ross Lagerwall)
  • Make all tests that hit the network disabled by default (f2cea87)
  • Avoid a resource leak on error in http client benchmark (ea92fba)
  • Update to latest tinytest (911b4f0349377) (ef7c4f7)
  • Avoid (unlikely) overflow in bench_httpclient.c (5671033)
  • Shave 700 msec off the persistent_timeout_jump test (21205b8)
  • Check return value of write() in regress.c (c8009d2)
  • Make load-dependent monotonic timer tests off-by-default (2b6fe8b)
  • Add deferred_cb_skew to list of timing-dependent tests (34c8f31)
  • Avoid test -e; older shs don't have one. (f1bd938)
  • Fix renegotiation test to work around openssl 1.0.1 bug (c2f3086)
  • Fix a couple of compile warnings in the unit tests (5a9a014)
  • MISC:
  • Change evutil_weakrand_() to avoid platform random() (e86af4b NicholasMarriott, 3aa4415)
  • INFRASTRUCTURE (Active-later events):
  • As a simplification and optimization to Libevent's "deferred callback" logic (introduced in 2.0 to avoid callback recursion), Libevent now treats all of its deferrable callback types using the same logic it uses for active events. Now deferred events no longer cause priority inversion, no longer require special code to cancel them, and so on.
  • Refactor the callback part of an event into its own event_callbacktype (cba59e5)
  • Add "active later" event_callbacks to supersede deferred (745a63d)
  • event_base_assert_ok: check value of event_active_count forcorrectness (fec8bae)
  • Replace deferred_cbs with event_callback-based implementation. (ae2b84b)
  • Replace more deferred_cb names with event_callback (a4079aa)
  • Give event_base_process_active a single exit path (581b5be)
  • Restore our priority-inversion-prevention code with deferreds (c0e425a)
  • Refactor event_persist_closure: raise and extract some common logic(bec22b4)
  • Remove the unused bits from EVLIST_ALL (9889a3d)
  • BUILD IMPROVEMENTS:
  • Libevent 2.1.2-alpha modernizes Libevent's use of autotools, and makes numerous other build system. Parallel builds should be faster, and all builds should be quieter.
  • Split long lists in Makefile.am into one-item-per-line (2711cda)
  • Remove unnecessary code in configure.in. (e65914f Ross Lagerwall)
  • attempt to support OpenSSL in Makefile.nmake (eba0eb2 Patrick Pelletier)
  • Use newer syntax for autoconf/automake init (7d60ba8)
  • Enable silent build rules by default. Override with V=1 (7b18e5c)
  • Switch to non-recursive makefiles (7092f3b)
  • Rename subordinate Makefile.ams to include.am (6cdfeeb)
  • Make quiet build even quieter (371a123)
  • New --quiet option for event_rpcgen.py (aa59c1e)
  • Be quiet when making regress.gen.[ch] (607a8ff)
  • Fix handling of no-python case for nonrecursive make (1e3123d)
  • We now require automake 1.9 or later. Modernize! (b7f6e89)
  • Rename configure.in to configure.ac. (b3fea67 Ross Lagerwall)
  • Use correct openssl libs and includes in pkgconfig file (d70af27)
  • Use the same CFLAGS for openssl when building unit tests as withlibevent (1d9d511)
  • DOCUMENTATION
  • Note that make_base_notifiable should not be necessary (26ee5f9)
  • Be more clear that LEV_OPT_DEFERRED_ACCEPT has tricky prereqs (371efeb)
  • Add caveat to docs about bufferevent_free() with data in outbuf (6fab9ee)
  • Make it more clear that NOLOCK means "I promise, no multithreading" (9444524)
  • Fix a comment in test-fdleak after 077c7e949. (3881d8f Ross Lagerwall)
  • Make the Makefile.nmake warning slightly less dire (e7bf4c8)
  • Fix typo : events instead of evets (05f1aca Azat Khuzhin)
  • Additional comments about OPENSSL_DIR variable, prompted by Dave Hart(6bde2ef Patrick Pelletier)
  • EVHTTP:
  • ignore LWS after field-content in headers (370a2c0 Artem Germanov)
  • Clean up rtrim implementation (aa59d80)
  • Remove trailing tabs in HTTP headers as well. (ac42519)
  • Remove internal ws from multiline http headers correctly (c6ff381)
  • Move evutil_rtrim_lws_ to evutil.c where it belongs (61b93af)
  • add evhttp_request_get_response_code_line (4f4d0c9 Jay R. Wren)
  • Use EVUTIL_SOCKET_ERROR() wrapper to save/restore errno inevhttp_connection_fail_ (7afbd60)
  • preserve errno in evhttp_connection_fail_ for inspection by thecallback (36d0ee5 Patrick Pelletier)
  • BUG FIXES:
  • Correctly handle running on a system where accept4 doesn't work. (9fbfe9b)
  • Avoid double-free on error in evbuffer_add_file. Found bycoverity. (6a81b1f)
  • Fix another possible uninitialized read in dns regression tests. Foundby coverity. (13525c5)
  • Add checks for functions in test-ratelim.c; found by Coverity (aa501e1)
  • Avoid memory leak in test_event_calloc unit test; found by coverity(92817a1)
  • Fix a shadowed variable in addfile_test_readcb; found by coverity(225344c)
  • Check return value when using LEV_OPT_DEFERRED_ACCEPT. Found bycoverity (6487f63)
  • Prevent reference leak of bufferevent if getaddrinfo fails. (b757786Joachim Bauch)
  • Make event_base_getnpriorities work with old "implicit base" code(c46cb9c)
  • Simplify and correct evutil_open_closeonexec_ (0de587f)
  • Fix event_dlist definition when sys/queue not included (81b6209Derrick Pallas)

New in libevent 2.0.21 (Apr 17, 2013)

  • BUG FIXES:
  • ssl: Don't discard SSL read event when timeout and read come close together (576b29f)
  • ssl: Stop looping in "consider_reading" if reading is suspended. (f719b8a Joachim Bauch)
  • ssl: No need to reserve space if reading is suspended. (1acf2eb Joachim Bauch)
  • dns: Avoid a memory-leak on OOM in evdns. (73e85dd, f2bff75 George Danchev)
  • build: Use python2 rather than python (0eb0109 Ross Lagerwall)
  • build: Compile without warnings on mingw64 (94866c2)
  • build: Fix compilation on mingw64 with -DUSE_DEBUG (62bd2c4)
  • build: Make rpcgen_wrapper.sh work on systems without a "python2" binary (f3009e4)
  • iocp: Close IOCP listener socket on free when LEV_OPT_CLOSE_ON_FREE is set (cb853ea Juan Pablo Fernandez)
  • core: Avoid crash when event_pending() called with no event_base set on event (e3cccf3)
  • misc: remove stray 'x' so print_err will compile when uncommented (ac35650 Patrick Pelletier)
  • tests: Fix renegotiation test to work around openssl 1.0.1 bug (c2f3086)
  • tests: Warn when openssl version in unit test mismatches compiled version. (ac009f9)

New in libevent 2.0.16 (Nov 21, 2011)

  • More detailed message in case of libevent self-debugging failure. (9e6a4ef Leonid Evdokimov)
  • epoll: close fd on alloc fail at initialization (1aee718 Jamie Iles)
  • Fix compile warning from saying event2/*.h inside a comment (447b0ba)
  • Warn when unable to construct base because of failing make_base_notifiable (4e797f3)
  • Don't try to make notifiable event_base when no threading fns are configured (e787413)

New in libevent 2.0.5 Beta (May 13, 2010)

  • Avoid a spurious close(-1) on Linux (70a44b6)
  • Do not close(-1) when freeing an uninitialized socket bufferevent (b34abf3)
  • Free evdns_base->req_heads on evdns_base_free (859af67)
  • Avoid an (untriggerable so far) crash bug in bufferevent_free() (0cf1431)
  • Set mem_offset for every bufferevent type (657d1b6)
  • Fix infrequent memory leak in bufferevent_init_common(). (8398641 Jardel Weyrich)
  • Make evutil_signal_active() match declaration. (e1e703d Patrick Galbraith)
  • Fix minheap code to use replacement malloc functions (a527618)
  • Fix a free(NULL) in minheap-internal.h (6f20492)
  • Fix critical bug in evbuffer_write when writev is not available (cda56ab)
  • Make the no_iovecs case of write_atmost compile (8e227b0)
  • Fix a memory leak when appending/prepending to a buffer with unused space. (45068a3)
  • Clean up a mistake in pointer manipulation in evbuffer_remove (28bfed4 Christopher Davis)
  • Always round up when there's a fractional number of msecs. (8f9e60c Christopher Davis)
  • Fix compiler warnings under WIN32 (d469c50 Giuseppe Scrivano)
  • Clean up properly when adding a signal handler fails. (b84b598 Gilad Benjamini) o Ensure that evdns_request is a persistent handle. (15bb82d Christopher Davis)
  • Free search state when finished searching to avoid an infinite loop. (a625840 Christopher Davis)
  • Assert for valid requests as necessary. (67072f3 Christopher Davis)
  • do not leak the request object on persistent connections (9d8edf2)

New in libevent 2.0.4 Alpha (Mar 4, 2010)

  • Add stub header for 2.0.4-alpha changelog. (94d0065)
  • Improve the README with more information and links. (0b42726)
  • Add more people who wrote patches to the acknowledgments (0af10d5)
  • Add a warning about the use of event_initialized. (f32b575)
  • Add a LICENSE file so people can find our license easily (7067006)
  • Add a new "hello world" sample program (becb9f9)
  • Clarify status of example programs (d60a1bd)
  • Update time-test.c to use event2 (f4190bf)
  • Add the arc4random.c license to the LICENSE file. (e15e1e9)
  • NEW FEATURES AND INTERFACE CHANGES
  • Improved optional lock debugging. (0cd3bb9)
  • Rate-limiting for bufferevents; group and individual limits are supported. (737c9cd)
  • Testing code for bufferevent rate-limiting. (f0c0124)
  • Make the initial nameserver probe timeout configurable. (1e56a32)
  • Revise the locking API: deprecate the old locking callbacks and add trylock. (347952f)
  • Do not make bufferevent_setfd implicitly disable EV_READ and EV_WRITE. (8274379)
  • Do not ignore bufferevent_enable(EV_READ) before bufferevent_connect(). (4a5b534)
  • Introduced evutil_make_socket_closeonexec() to preserve fd flags for F_SETFD. (d0939d2 Jardel Weyrich)
  • evdns_getaddrinfo() now supports the /etc/hosts file. (72dd666)
  • Look at the proper /etc/hosts file on windows. (66c02c7)
  • Allow http connections to use evdns for hostname looksups. (c698b77)
  • Changelist code to defer event changes until just before dispatch (27308aa)
  • do not use a function to assign the evdns base; instead assign it via evhttp_connection_base_new() which is a new function introduced in 2.0 (5032e52)
  • Functions to access more fields of struct event. (0683950)
  • Make kqueue use changelists. (45e5ae3)
  • Remove kqueue->pend_changes. (3225dfb)
  • Minimize epoll_ctl calls by using changelist (c8c6a89)
  • Add support for a "debug mode" to try to catch common errors. (cd17c3a)
  • Note a missing ratelim function (361da8f)
  • Add ev_[u]intptr_t to include/event2/util.h (1fa4c81)
  • const-ify a few more functions in event.h (d38a7a1)
  • Deprecate EVENT_FD and EVENT_SIGNAL. (f6b2694)
  • Remove EVUTIL_CHECK_FMT. (6c21c89)
  • Add EV_*_MAX macros to event2/util.h to expose limits for ev_* types. (aba1fff) o Functions to view and manipulate rate-limiting buckets. (85047a6)
  • Add the rest of the integer limits, and add a test for them. (60742d5)
  • Remove the 'flags' argument from evdns_base_set_option() (1dd7e6d)
  • Add an arc4random implementation for use by evdns (d4de062)
  • Use off_t for the length parameter of evbuffer_add_file (3fe60fd)
  • Construct Windows locks using InitializeCriticalSectionAndSpinCount (32c6f1b)
  • Expose view of current rate limit as constrained by group limit (162ce8a)
  • Provide consistent, tested semantics for bufferevent timeouts (d328829)
  • BUGFIXES AND TESTS
  • Tolerate code that returns from a fatal_cb. (91fe23f)
  • Parenthesize macro arguments more aggressively (07e9e9b)
  • Fix memory-leak of signal handler array with kqueue. (e1ffbb8)
  • Stop passing EVTHREAD_READ and EVTHREAD_WRITE to non-rw locks. (76cd2b7)
  • Fix two use-after-free bugs in unit tests spoted by lock debugging (d84d838)
  • Fix a locking bug in event_base_loop() (da1718b)
  • Fix an evdns lock violation. (2df1f82 Zhuang Yuyao)
  • Valgrind fix: Clear struct kevent before checking for OSX bug. (56771a3 William Ahern)
  • Fix up evthread compilation on windows (bd6f1ba Roman Puls)
  • Fix regress_iocp.c usage of old lock allocation macros. (31687b4 unknown)
  • Update nmake makefile to build evthread.c (b62d979 unknown)
  • Fix a crash when reading badly formatted resolve.conf; from Yasuoka Masahiko (6c7c579 Yasuoka Masahiko)
  • Fix a snow leopard compile warning in the unit tests. (7ae9445)
  • Fix compile on Snow Leopard with gcc warnings enabled (70cdfe4 Sebastian Hahn)
  • Only define _GNU_SOURCE if it is not already defined. (ea6b1df Joachim Bauch)
  • Update sample/signal-test.c to use newer APIs and not leak. (f6430ac Evan Jones)
  • Fix a segfault when writing a very fragmented evbuffer onto an SSL (a6adeca Joachim Bauch)
  • Fix a segfault when freeing SSL bufferevents in an unusual order (a773df5 Joachim Bauch)
  • Drop install-sh from our git repo: a mismatched version could break "make dist" (6799527)
  • Set all instances of the version number correctly. (5a112d3)
  • Fix a few locking issues on windows. (c51bb3c unknown)
  • Use evutil_socket_t, not int, when logging socket errors. (292467c)
  • Fix up behavior of never-defered callbacks a little (390e056)
  • Replace some cases of uint32_t with ev_uint32_t. (a47d88d)
  • Fix compilation of devpoll.c by adding missing thread includes. (fee2c77 Dagobert Michelsen)
  • Make evutil_make_socket_nonblocking() leave any other flags alone. (4c8b7cd Jardel Weyrich)
  • Fix an fd leak in evconnlistener_new_bind(). (24fb502 Jardel Weyrich)
  • Fix a bogus free in evutil_new_addrinfo() (0d64051 Jardel Weyrich)
  • Adjusted fcntl() retval comparison on evutil_make_socket_nonblocking(). (4df7dbc Jardel Weyrich)
  • Fix the code that allowed DNS options to not end with : (ee4953f)
  • Fix crash bugs when a bufferevent's eventcb is not set. (2e8eeea)
  • Fix test-ratelim compilation on Linux. (885b427)
  • Fix compilation of rate-limiting code on win32. (165d30e)
  • Eradicated the last free() call. Let mm_free() take care of deallocation. (0546ce1 Jardel Weyrich)
  • Fix byte counts when mixing deferred and non-deferred evbuffer callbacks. (29151e6)
  • Fixed a memory leak on windows threads implementation. The CRITICAL_SECTION was not being free'd in evthread_win32_lock_free(). (2f33e00 Jardel Weyrich)
  • Fixed a fd leak in start_accepting(), plus cosmetic changes (4367a33 Jardel Weyrich)
  • Improved error handling in evconnlistener_new_async(). Also keeping the fd open because it is not opened by this function, so the caller is responsible for closing it. Additionally, since evconnlistener_new_bind() creates a socket and passes it to the function above, it required error checking to close the same socket. (fec66f9 Jardel Weyrich)
  • Don't use a bind address for nameservers on loopback (8d4aaf9)
  • Fix compilation of rate-limit code when threading support is disabled (97a8c79)
  • Detect setenv/unsetenv; skip main/base_environ test if we can't fake them. (7296971)
  • Check more internal event_add() calls for failure (ff3f6cd)
  • Fix windows and msvc build (5c7a7bc)
  • Call event_debug_unassign on internal events (a19b4a0)
  • Try to fix a warning in hash_debug_entry (137f2c6)
  • Fix a dumb typo in ev_intptr_t definitions. (27c9a40)
  • do not fail while sending on http connections the client closed. (93d7369)
  • make evhttp_send() safe against terminated connections, too (3978180)
  • Make Libevent 1.4.12 build on win32 with Unicode enabled. (000a33e Brodie Thiesfield)
  • Fix some additional -DUNICODE issues on win32. (a7a9431)
  • Add a check to make soure our EVUTIL_AI flags do not conflict with the native ones (c18490e)
  • Always use our own gai_strerror() replacement. (6810bdb)
  • Make RNG work when we have arc4random() but not arc4random_buf() (4ec8fea)
  • validate close cb on server when client connection closes (2f782af)
  • Fix two unlocked reads in evbuffer. (7116bf2)
  • When working without a current event base, don't try to use IOCP listeners (cb52838)
  • Fix getpid() usage on Windows (ff2a134)
  • Add a unit test for secure rng. (48a29b6)
  • Add some headers to fix freebsd compilation (b72be50)
  • When connect() succeeds immediately, don't invoke the callback immediately. (7515de9)
  • Suspend read/write on bufferevents during hostname lookup (db08f64)
  • Make bufferevent_free() clear all callbacks immediately. (b2fbeb3)
  • Fix some race conditions in persistent events and event_reinit (e2642f0)
  • Fix a bug in resetting timeouts on persistent events when IO triggers. (38ec0a7)
  • Add a test for timeouts on filtering bufferevents. (c02bfe1)
  • Add test for periodic timers that get activated for other reasons (8fcb7a1)
  • Use new timeval diff comparison function in bufferevent test (f3dfe46)
  • Delete stack-alloced event in new unit test before returning. (7ffd387)
  • Fix mingw compilation (23170a6)
  • Try to define a sane _EVENT_SIZEOF_SIZE_T for msvc compilation (1e14f82)
  • Fix arc4random compilation on MSVC. (98edb89)
  • deal with connect() failing immediately (7bc48bf)
  • Small cleanups on freebsd-connect-refused patch. (57b7248)
  • BUILD AND DISTRIBUTION CHANGES
  • Remove the contents of WIN32-Prj as unmaintained. (c69d5a5)
  • Allow the user to redirect the verbose output of test/test.sh to a file (c382de6)
  • Allow test.sh to be run as ./test/test.sh (7dfbe94)
  • Never believe that we have pthreads on win32, even if gcc thinks we do. (78ed097)
  • Make it compile under gcc --std=c89. (e2ca403)
  • Fix a number of warnings from gcc -pedantic (918e9c5)
  • Add the msvc-generated .lib files to .gitignore. (e244a2e)
  • Add the "compile" script to gitignore. (1ba6bed)
  • INTERNALS AND CODE CLEANUPS
  • Add a .gitignore file. (ba34071)
  • New EVTHREAD_TRY_LOCK function to try to grab a lock. (689fc09)
  • Add the abilitity to mark some buffer callbacks as never-deferred. (438f9ed)
  • Refactor our 'suspend operation' logic on bufferevents. (0d744aa)
  • Simplify the read high-watermark checking. (5846bf6)
  • Improve readability of evutil_unparse_protoname() (5a43df8 Jardel Weyrich)
  • Expose our cached gettimeofday value with a new interface (47854a8)
  • Whitespace fixes in test.sh (0b151a9)
  • Enable branch-prediction hints with EVUTIL_UNLIKELY. (eaaf27f)
  • Refactor code from evdns into a new internal "read a file" function. (0f7144f)
  • Comestic changes in evconnlistener_new(), new_accepting_socket(), accepted_socket_invoke_user_cb() and iocp_listener_enable(). (510ab6b Jardel Weyrich)
  • Add unit-test for bad_request bug fixed in 1.4 recently. (6cc79c6 Pavel Plesov) o Add a comment on evthread_enable_lock_debuging. (b9f43b2)
  • Fix test.sh on shells without echo -n (94131e9)
  • More unit tests for getaddrinfo_async: v4timeout and cancel. (a334b31)
  • Make http use evconnlistener. (ec34533)
  • move dns utility functions into a separate file so that we can use them for http testing (b822639)
  • add a test for evhttp_connection_base_new with a dns_base (26714ca)
  • forgot to add void to test function (78a50fe)
  • Add a forgotten header (changelist-internal.h) (4b9f307)
  • Remove some commented-out code in evutil (26e1b6f)
  • Remove a needless include of rpc_compat.h (70a4a3e)
  • Use less memory for each entry in a hashtable (a66e947)
  • Try to untangle the logic in server_port_flush(). (439aea0)
  • Use ev_[u]intptr_t types in place of [u]intptr_t (cef61a2)
  • Reduce windows header includes in our own headers. (da6135e)
  • clean up terminate_chunked test (e8a9782)
  • Increment the submicro version number. (63e868e)
  • Update event-config.h version number to match configure.in (aae7db5)
  • Clean up formatting: Disallow space-before-tab. (8fdf09c)
  • Clean up formatting: use tabs, not 8-spaces, to indent. (e5bbd40)
  • Clean up formatting: remove trailing spaces (e5cf987)
  • Clean up formatting: function/keyword spacing consistency. (4faeaea)

New in libevent 2.0.3 Alpha (Jan 13, 2010)

  • Add a new code to support SSL/TLS on bufferevents, using the OpenSSL library (where available).
  • Fix a bug where we didn't allocate enough memory in event_get_supported_methods().
  • Avoid segfault during failed allocation of locked evdns_base. (Found by Rocco Carbone.)
  • Export new evutil_ascii_* functions to perform locale-independent character type operations.
  • Try to compile better with MSVC: patches from Brodie Thiesfield
  • New evconnlistener_get_fd function to expose a listener's associated socket.
  • Expose an ev_socklen_t type for consistent use across platforms.
  • Make bufferevent_socket_connect() work when the original fd was -1.
  • Fix a bug in bufferevent_socket_connect() when the connection succeeds too quickly.
  • Export an evutil_sockaddr_cmp() to compare to sockaddr objects for equality.
  • Add a bufferevent_get_enabled() to tell what a bufferevent has been configured to do.
  • Add an evbuffer_search_eol() function to locate the end of a line nondestructively.
  • Add an evbuffer_search_range() function to search a bounded range of a buffer.
  • Fix a rare crash bug in evdns.
  • Have bufferevent_socket_connect() with no arguments put a bufferevent into connecting mode.
  • Support sendfile on Solaris: patch from Caitlin Mercer.
  • New functions to explicitly reference a socket used by an evhttp object. Patches from David Reiss.
  • When we send a BEV_EVENT_CONNECTED to indicate connected status, we no longer invoke the write callback as well unless we actually wrote data too.
  • If the kernel tells us that there are a negative number of bytes to read from a socket, do not believe it. Fixes bug 2841177; found by Alexander Pronchenkov.
  • Do not detect whether we have monotonic clock support every time a new event base is created: instead do it only once. Patch taken from Chromium.
  • Do not allocate the maximum event queue for the epoll backend at startup. Instead, start out accepting 32 events at a time, and double the queue's size when it seems that the OS is generating events faster than we're requesting them. Saves up to 374K per epoll-based event_base. Resolves bug 2839240.
  • Treat an event with a negative fd as valid but untriggerable by Libevent. This is useful for applications that want to manually activate events.
  • Fix compilation on Android, which forgot to define fd_mask in its sys/select.h
  • Do not drop data from evbuffer when out of memory; reported by Jacek Masiulaniec
  • New event_base_got_exit() and event_base_got_break() functions to tell whether an event loop exited because of an event_base_loopexit() or an event_base_loopbreak(). Patch from Ka-Hing Cheung.
  • When adding or deleting an event from a non-main thread, only wake up the main thread when its behavior actually needs to change.
  • Fix some bugs when using the old evdns interfaces to initialize the evdns module.
  • Detect errors during bufferevent_connect(). Patch from Christopher Davis.
  • Fix compilation for listener.h for C++ - missing extern "C". Patch from Ferenc Szalai.
  • Make the event_base_loop() family of functions respect thread-safety better. This should clear up a few hard-to-debug race conditions.
  • Fix a bug when using a specialized memory allocator on win32.
  • Have the win32 select() backend label TCP-socket-connected events as EV_WRITE, not EV_READ. This should bring it in line with the other backends, and improve portability. Patch from Christopher Davis.
  • Stop using enums as arguments or return values when what we mean is a bitfield of enum values. C++ doesn't believe that you can OR two enum values together and get another enum, and C++ takes its typing seriously. Patch from Christopher Davis.
  • Add an API to replace all fatal calls to exit() with a user-provided panic function.
  • Replace all assert() calls with a variant that is aware of the user-provided logging and panic functions.
  • Add a return value to event_assign so that it can fail rather than asserting when the user gives it bad input. event_set still dies on bad input.
  • The event_base_new() and event_base_new_with_config() functions now never call exit() on failure. For backward "compatibility", event_init() still does, but more consistently.
  • Remove compat/sys/_time.h. It interfered with system headers on HPUX, and its functionality has been subsumed by event2/util.h and util-internal.h.
  • Add a new bufferevent_socket_connect_hostname() to encapsulate the resolve-then-connect operation.
  • Build kqueue.c correctly on GNU/kFreeBSD platforms. Patch pulled upstream from Debian.
  • Alternative queue-based timeout algorithm for programs that use a large number of timeouts with the same value.
  • New event_base_config option to disable the timeval cache entirely.
  • Make EV_PERSIST timeouts more accurate: schedule the next event based on the scheduled time of the previous event, not based on the current time.
  • Allow http.c to handle cases where getaddrinfo returns an IPv6 address. Patch from Ryan Phillips.
  • Fix a problem with excessive memory allocation when using multiple event priorities.
  • Default to using arc4random for DNS transaction IDs on systems that have it; from OpenBSD.
  • Never check the environment when we're running setuid or setgid; from OpenBSD.
  • Options passed to evdns_set_option() no longer need to end with a colon.
  • Add an evutil_getaddrinfo() function to clone getaddrinfo on platforms that don't have it.
  • Add an evdns_getaddrinfo() function to provide a nonblocking getaddrinfo using evdns, so programs can perform useful hostname lookup.
  • Finally expose the IOCP-based bufferevent backend. It passes its unit tests, but probably still has some bugs remaining. Code by Nick Mathewson and Christopher Davis.
  • Numerous other bugfixes.
  • On FreeBSD and other OSes, connect can return ECONREFUSED immediately; instead of failing the function call, pretend with faileld in the callback.
  • Fix a race condition in the pthreads test case; found by Nick Mathewson
  • Remove most calls to event_err() in http and deal with memory errors instead

New in libevent 2.0.2 Alpha (Oct 12, 2009)

  • Add a new flag to bufferevents to make all callbacks automatically deferred.
  • Make evdns functionality locked, and automatically defer dns callbacks.
  • Fix a possible free(NULL) when freeing an event_base with no signals.
  • Add a flag to disable checking environment varibles when making an event_base
  • Disallow setting less than 1 priority.
  • Fix a bug when removing a timeout from the heap. [Patch from Marko Kreen]
  • Use signal.h, not sys/signal.h. [Patch from mmadia]
  • Try harder to build with certain older c99 compilers.
  • Make sure that an event_config's flags field is always initialized to 0. [Bug report from Victor Goya]
  • Avoid data corruption when reading data entirely into the second-to-last chain of an evbuffer. [Bug report from Victor Goya]
  • Make sendfile work on FreeBSD
  • Do not use vararg macros for accessing evrpc structures; this is not backwards compatible, but we did not promise any backwards compatibility for the rpc code.
  • Actually define the event_config_set_flag() function.
  • Try harder to compile with Visual C++.
  • Move event_set() and its allies to event2/event_compat.h where they belong.
  • Remove the event_gotsig code, which has long been deprecated and unused.
  • Add an event_get_base() function to return the base assigned to an event.
  • New function to automate connecting on a socket-based bufferevent.
  • New functions to automate listening for incoming TCP connections.
  • Do case-insensitive checks with a locale-independent comparison function.
  • Rename the evbuffercb and everrorcb callbacks to bufferevent_data_cb and bufferevent_event_cb respectively. The old names are available in bufferevent_compat.h.
  • Rename the EVBUFFER_* codes used by bufferevent event callbacks to BEV_EVENT_*, to avoid namespace collision with evbuffer flags. The old names are available in bufferevent_compat.h.
  • Move the EVBUFFER_INPUT and EVBUFFER_OUTPUT macros to bufferevent_compat.h
  • Add a bufferevent_getfd() function to mirror bufferevent_setfd()
  • Make bufferevent_setfd() return an error code if the operation is not successful.
  • Shave 22 bytes off struct event on 32-bit platforms by shrinking and re-ordering fields. The savings on 64-bit platforms is likely higher.
  • Cap the maximum number of priorities at 256.
  • Change the semantics of evbuffer_cb_set_flags() to be set-flag only; add a new evbuffer_cb_clear_flags() to remove set flags.
  • Change the interface of evbuffer_add_reference so that the cleanup callback gets more information
  • Revise the new evbuffer_reserve_space/evbuffer_commit_space() interfaces so that you can use them without causing extraneous copies or leaving gaps in the evbuffer.
  • Add a new evbuffer_peek() interface to inspect data in an evbuffer without removing it.
  • Fix a deadlock when suspending reads in a bufferevent due to a full buffer. (Spotted by Joachim Bauch.)

New in libevent 1.4.11 (Jul 20, 2009)

  • Fix a bug when removing a timeout from the heap. [Patch from Marko Kreen]
  • Remove the limit on size of HTTP headers by removing static buffers.
  • Fix a nasty dangling pointer bug in epoll.c that could occur after epoll_recalc(). [Patch from Kevin Springborn]
  • Distribute Win32-Code/event-config.h, not ./event-config.h

New in libevent 1.4.9 (Feb 28, 2009)

  • Clear the timer cache on entering the event loop; reported by Victor Chang
  • Only bind the socket on connect when a local address has been provided; reported by Alejo Sanchez
  • Allow setting of local port for evhttp connections to support millions of connections from a single system; from Richard Jones.
  • Clear the timer cache when leaving the event loop; reported by Robin Haberkorn
  • Fix a typo in setting the global event base; reported by lance.
  • Fix a memory leak when reading multi-line headers
  • Fix a memory leak by not running explicit close detection for server connections

New in libevent 1.4.8 (Dec 10, 2008)

  • Match the query in DNS replies to the query in the request; from Vsevolod Stakhov.
  • Fix a merge problem in which name_from_addr returned pointers to the stack; found by Jiang Hong.
  • Do not remove Accept-Encoding header