Branch :
| Author | Commit | Date | CI | Message |
|---|---|---|---|---|
| c89b4e63 | 2012-02-11 21:01:53 | 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. | ||
| 604569bf | 2012-01-27 16:35:04 | 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. | ||
| 7622d265 | 2012-01-27 15:10:28 | Make test-changelist faster | ||
| 39b3f38d | 2012-01-27 14:39:18 | Check changelist as part of checking representational integrity | ||
| 2c4b5de1 | 2012-01-27 14:30:41 | 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. | ||
| 272033ef | 2012-01-27 13:54:05 | 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. | ||
| 4b7baec6 | 2012-01-26 16:56:33 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| 9f9e259f | 2012-01-26 15:04:24 | 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. | ||
| 2c6b3246 | 2012-01-24 17:18:52 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| c94a5f2a | 2012-01-24 17:15:50 | Do a memberwise comparison of threading function tables Doing a memcmp risks comparing uninitialized padding bytes at the end of the structure. | ||
| 95e2455c | 2012-01-24 16:08:00 | 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. | ||
| b9f7e5fd | 2012-01-24 15:58:11 | Allow more slop in deferred_cb_skew test; freebsd needs it | ||
| ea30a435 | 2012-01-24 15:30:51 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| 3aa0e8a9 | 2012-01-24 15:30:31 | Remove a couple of now-unused variables | ||
| 438d4ff2 | 2012-01-24 15:29:39 | Make event_base integrity check work on windows | ||
| edc6d7d7 | 2012-01-24 15:09:04 | Start writing a changelog for 2.0.17-stable | ||
| b77b43fc | 2012-01-24 14:59:37 | Use test_timeval_diff_eq more consistently | ||
| 67a1763b | 2012-01-24 14:33:10 | 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. | ||
| 350a3c40 | 2012-01-24 14:34:04 | New evhttp function to adjust initial retry timeout | ||
| ab14f7c1 | 2012-01-24 11:45:00 | 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 | ||
| f25d9d32 | 2012-01-24 11:42:26 | Add an (internal) usleep function for use by unit tests | ||
| 18653fca | 2012-01-24 11:17:06 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| 5408ff3b | 2012-01-24 11:16:26 | Oops:remove an accidentally committed "sleep(1)" in a unit test | ||
| 10996a1a | 2012-01-24 11:04:56 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| dab91877 | 2012-01-24 11:04:19 | Workaround in the unit tests for an apparent epoll bug in Linux 3.2 | ||
| fe0afabb | 2012-01-24 10:29:31 | Merge remote-tracking branch 'origin/patches-2.0' Conflicts: event.c Edits required in: evmap.c | ||
| 3f18ad1b | 2012-01-23 18:15:44 | Fix a fd leak in event_reinit() We were supposed to be closing the ev_signal_pair sockets. | ||
| 6e41cdc1 | 2012-01-23 17:59:16 | 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! | ||
| 3312b020 | 2012-01-23 17:43:35 | Check event_base correctness at end of each unit test | ||
| 40a3c52d | 2012-01-22 22:27:16 | Fix compilation of windows evutil_check_ifaddrs | ||
| 27737d55 | 2012-01-21 12:55:15 | Add function to check referential integrity of an event_base | ||
| 5683e2b1 | 2012-01-20 16:31:20 | Merge remote-tracking branch 'github/linked_list' Conflicts: include/event2/event_struct.h | ||
| 677f23cc | 2012-01-20 11:40:39 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| 790f6b3b | 2012-01-10 18:33:58 | Force strict validation of HTTP version in response. This sometimes accepted invalid versions like 'ICY' (n = 0, major = undefined, sometimes > 1). | ||
| a86a0c04 | 2012-01-16 14:47:05 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| 7206e8cd | 2012-01-16 14:45:31 | Suppress a gcc warning from ignoring fwrite return in http-sample.c Found by Steve Snyder | ||
| 26e85fcc | 2012-01-09 16:54:19 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| cba48c7d | 2012-01-09 16:44:53 | Fix a race condition in the dns/bufferevent_connect_hostname test. As originally written, the test would only pass if the accept() callbacks for the evconnlistener were all invoked before the last of the CONNECTED/ERROR callbacks for the connecting/resolving bufferevent had its call to event_base_loopexit() complete. But this was only accidentally true in 2.0, and might not be true at all in 2.1 where we schedule event_base_once() callbacks more aggressively. Found by Sebastian Hahn. | ||
| d5a3fe5f | 2012-01-09 12:00:04 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| ecfc720a | 2012-01-09 11:49:41 | Make evconnlistener work around bug in older Linux when getting nmapped Older Linuxes sometimes respond to some nmap probes by having accept() return a success but with socklen 0. That can lead to confusing behavior when you go to process the sockaddr. | ||
| f0325167 | 2012-01-09 11:33:38 | Remove bogus casts of socket to int before calling ev_callback This should make 64-bit windows act better. Found by Mark Heily. | ||
| 0586c25e | 2011-12-14 16:28:18 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| da70fa70 | 2011-12-14 16:17:19 | Backport evhttp_connection_get_bufferevent to Libevent 2.0 Backport by Arno Bakker; original implementation in 8d3a8500f4 | ||
| cac02fad | 2011-12-08 14:38:04 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| 7bbf6ca7 | 2011-12-08 14:36:32 | Slightly clarify evbuffer_peek documentation | ||
| c986f232 | 2011-12-08 14:30:20 | Fix behavior of evbuffer_peek(buf,-1,NULL,NULL,0) (Patch altered by nickm to not affect the behavior of evbuffer_peek(buf,-1,NULL,vec,n_vec).) | ||
| e0f0dbf9 | 2011-12-08 14:11:30 | Remove some accidentally-committed debugging code | ||
| 5c7675cc | 2011-12-08 14:05:47 | whitespace fixes | ||
| de5428e7 | 2011-12-08 14:04:04 | Merge remote-tracking branch 'fancycode/buffer_references' Conflicts: buffer.c | ||
| d4306028 | 2011-12-08 11:43:04 | Merge remote-tracking branch 'origin/patches-2.0' Conflicts: configure.in | ||
| 358c745e | 2011-12-08 11:39:48 | check for sysctl before we use it Not all C libraries under Linux support the sysctl() func. | ||
| 88a30ad8 | 2011-12-07 18:29:06 | Split up extra-long AC_CHECK_FUNCS/HEADERS lines in configure.in | ||
| 56c6afe2 | 2011-12-07 18:17:34 | Merge branch '21_ifaddr' | ||
| 7085a456 | 2011-12-07 18:16:32 | Use getifaddrs to detect our interfaces if possible The old scheme involved connected UDP sockets and getsockname(), and is generally best avoied. | ||
| a8e5e2fc | 2011-12-07 21:06:10 | Changed use of refcounts to make sure referenced chains are freed in all cases. | ||
| 27e22255 | 2011-12-07 13:04:35 | Add evbuffer_copyout_from to copy data from the middle of a buffer You could previously do this with evbuffer_peek() and some memcpys, but it was a bit more work than most folks wanted to get into. Closes sourceforge ticket 3108072 | ||
| 35c5c955 | 2011-12-07 11:49:52 | Bypass event_add when using event_base_once() for a 0-sec timeout Some people use event_base_once(EV_TIMEOUT) to make a callback get called "immediately". But this is pretty roundabout: it uses the timeout heap to immediately put the event onto the active queue, when it could just use event_active. Additionally, it can lead to surprising re-ordering behavior. This patch changes event_base_once so it bypasses event_add() and called event_active() directly on a pure-timeout event with an empty timeout. | ||
| 748a0d27 | 2011-12-06 13:38:40 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| 19277763 | 2011-12-06 13:35:54 | Fix a silly compilation error with the sun compiler Apparently, other compilers were allowing "return free(x)" in a function returning void. | ||
| 9ce5053d | 2011-12-06 11:02:12 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| 11f36a5f | 2011-12-05 15:02:27 | Be absolutely sure to clear pncalls before leaving event_signal_closure I thought we'd fixed the cases where this could come up, but apparently having an event_base_break() happen while processing signal events could get us in trouble. Found by Remi Gacogne. Sourceforge issue 3451433 . | ||
| da45aa74 | 2011-12-02 01:48:14 | fix windows compilation issues with new file segment code Found by Linus Nordberg | ||
| f3b89dec | 2011-11-24 12:31:50 | Fix two issues in the allow_dirty_shutdown code. First, it shouldn't crash when it's passed a non-ssl bufferevent. Second, it should behave correctly when it gets a true argument other than 1. | ||
| a44cd2b0 | 2011-11-24 12:24:38 | Tweak allow_dirty_shutdown documentation | ||
| 099d27df | 2011-11-21 19:57:19 | Allow users to set allow_dirty_shutdown | ||
| f7eb69ac | 2011-11-21 19:24:50 | bev_ssl: Be more specific in event callbacks. evhttp in particular gets confused without at least one of BEV_EVENT_{READING|WRITING}. | ||
| 3596a31d | 2011-11-18 15:35:33 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| ba4d6696 | 2011-11-18 15:34:37 | Increment version to 2.0.16-stable-dev | ||
| 5de3fa32 | 2011-11-18 15:27:06 | Increment version to 2.0.16-stable | ||
| 044c41de | 2011-11-18 15:16:11 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| 31c99bd2 | 2011-11-18 15:14:50 | Revise 2.0.16-stable changelog | ||
| 9ee9e943 | 2011-11-18 14:23:13 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| ebf82199 | 2011-11-17 17:42:45 | add comment to new consider_reading code | ||
| 2aa036fa | 2011-11-17 11:59:41 | Avoid spinning on OpenSSL reads Previously, if some sender were generating data to read on an OpenSSL connection as fast as we could process it, we could easily wind up looping on an openssl do_read operation without ever considering other sockets. The difference between this and the original method in consider_reading() is that it only loops for a single completed *frame* instead of looping until fd is drained or an error condition was triggered. {Patch split out by nickm} | ||
| 96c562fa | 2011-11-17 11:54:07 | Move SSL rate-limit enforcement into bytes_to_read() | ||
| a186e732 | 2011-11-17 11:45:49 | Refactor amount-to-read calculations in buffervent_ssl consider_reading() Split up consider_reading()'s conditional checks into another function can_read() for simplicity sake. {Split into a separate patch by nickm} | ||
| 6660c9a3 | 2011-11-15 18:34:24 | Revert "Avoid potential SSL read spinlocks" This reverts commit fc52dbac87f4937f8306759506d6a2ad15ca244c. | ||
| a62346de | 2011-11-15 18:33:50 | Revert "openssl bufferevent has the same issue with writing as prior commit." This reverts commit 7353663eb7c0b2a1caaaa5acd818515f156cf2ca. | ||
| fe9e831f | 2011-11-15 17:22:45 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| 34045c8f | 2011-11-15 17:22:12 | Add new entries to changelog, new credits to README | ||
| b17b0eec | 2011-11-15 17:11:42 | Fix DNS memleak checks when running with malloc-replacement/debugging disabled | ||
| f5b937e6 | 2011-11-14 18:22:08 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| e7874133 | 2011-11-14 17:33:02 | Don't try to make notifiable event_base when no threading fns are configured | ||
| 4e797f38 | 2011-11-14 17:32:22 | Warn when unable to construct base because of failing make_base_notifiable | ||
| 2ebc8c80 | 2011-11-14 11:55:37 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| 7353663e | 2011-11-14 10:57:15 | openssl bufferevent has the same issue with writing as prior commit. | ||
| fc52dbac | 2011-11-14 10:24:07 | Avoid potential SSL read spinlocks OpenSSL bufferevents with deferred callbacks enabled under high load will spinlock in the function consider_reading(). This loop continues until all data has been read. Because of this condition; openssl bufferevents will never return back into event_base_loop() until SSL_read has determined data is no longer ready. As of yet I have not found a reason why this while loop exists, so this patch just swaps out while for if. If needed I can write same code which would trigger this effect; optionally libevhtp has a test.c program which can be run with the following flags: ./test -s <keyfile.pem> curl -vvvv -k -d@<HUGE_ASS_FILE> https://127.0.0.1:8081/ The return data will include the number of times the readcb got data and the length of that read. Without this patch, you are likely to see a small amount of "bytes read....", otherwise the "bytes read..." return data should show much more reasonable numbers. | ||
| 9ae6e595 | 2011-11-14 11:45:17 | Merge remote-tracking branch 'origin/patches-2.0' Conflicts: sample/dns-example.c | ||
| 54142c94 | 2011-11-14 11:43:31 | unit tests for EVBUFFER_EOL_NUL | ||
| d7a8b36e | 2011-11-14 11:42:52 | New EVBUFFER_EOL_NUL to read NUL-terminated strings from an evbuffer | ||
| 27b5398f | 2011-11-11 17:56:08 | Tweaks, fixups, and comments on evbuffer_add_iovec | ||
| aaec5aca | 2011-10-25 09:13:15 | Added evbuffer_add_iovec and unit tests. | ||
| a3f320e8 | 2011-11-09 00:17:56 | Improve win32 behavior of dns-sample.c codex | ||
| 95af0433 | 2011-11-03 11:45:43 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| 674bc6a2 | 2011-11-03 11:43:49 | Fix typo in whatsnew-2.0.txt | ||
| dea055d0 | 2011-11-02 23:15:07 | Merge remote-tracking branch 'github/20_evbuffer_remove_bug' | ||
| c882a959 | 2011-11-02 23:14:24 | Merge remote-tracking branch 'origin/patches-2.0' | ||
| b18c04dd | 2011-11-02 22:50:47 | Use the free-trailing-chains function in evbuffer_insert_chain too | ||
| c37069cd | 2011-11-02 16:09:15 | Fix an evbuffer crash in evbuffer_remove_buffer() Found by Greg Hazel. | ||
| 7eb52eb8 | 2011-11-02 15:19:05 | improve test to remove at least one buffer from src |