Branch :
| Author | Commit | Date | CI | Message |
|---|---|---|---|---|
| 10c4c904 | 2010-04-12 12:50:17 | Do not inhibit automake dependencies generation It fixes make parallel builds. | ||
| 1234b95a | 2010-04-09 17:19:39 | Test another case of evbuffer_prepend | ||
| 8c83e995 | 2010-04-09 16:40:53 | Add more unit tests for evbuffer_expand | ||
| 06a4443a | 2010-04-09 15:28:26 | Unit-test every evbuffer_add_file() implementation. Previously, we'd only test the default one, even if the others were still compiled in. | ||
| d5ebcf37 | 2010-03-30 16:47:37 | Rewrite evbuffer_expand and its users The previous evbuffer_expand was not only incorrect; it was inefficient too. On all questions of time vs memory tradeoffs, it chose to burn time in order to avoid wasting memory. The new code tries to be a little more balanced: it only resizes an existing chain when doing so doesn't require too much copying, and when failing to do so would waste a lot of the chain's space. This patch also rewrites evbuffer_chain_insert to work properly with last_with_datap, and adds a few convenience functions to buffer.c. | ||
| b7442f8e | 2010-03-26 23:18:40 | Replace last_with_data with a slightly smarter version To implement evbuffer_expand() properly, you need to be able to replace the last chunk that has data, which means that we need to keep track of the the next pointer pointing to the last_with_data chunk, not the last_with_data chunk itself. | ||
| 7960af51 | 2010-03-22 13:37:39 | Merge branch 'build' | ||
| b557b175 | 2010-03-21 13:28:48 | Detect and refuse reentrant event_base_loop() calls Calling event_base_loop on a base from inside a callback invoked by that same base, or from two threads at once, has long been a way to get exceedingly hard-to-diagnose errors. This patch adds code to detect such reentrant invocatinos, and exit quickly with a warning that should explain what went wrong. | ||
| 33874b05 | 2010-03-16 13:37:15 | Make 'main/many_events' test 70 fds, not 64. This is mainly intended to ensure that we don't get hung up on the 64-handle limit that lots of O(n) Windows functions (but FWICT not select) like to enforce. | ||
| 274a7bd9 | 2010-03-13 00:55:39 | Fix some memory leaks in the unit tests These don't matter except inasmuch as they give real memory leaks a place to hide. Found with valgrind | ||
| 68dc742b | 2010-03-12 20:38:25 | Fix a write of uninitialized RAM in regression tests Not actually harmful, but not something we should be doing. Found by valgrind. | ||
| 0d047c3f | 2010-03-13 00:29:15 | Fix an obnoxious typo in the bufferevent_timeout_filter test We were using the same bufferevent as the child of two filtering parents, orphaning another. This made one get freed twice, and the other not at all. Possible fix for bug 2963306 spotted by Doug Cuthbertson. | ||
| b660edf9 | 2010-03-12 13:22:47 | Remove redundant stuff from EXTRA_DIST To a first approximation, sources that are mentioned anywhere in an automake file don't need to get mentioned in EXTRA_DIST. | ||
| 426c8fbe | 2010-03-12 13:09:28 | Support the standard 'make check' target in place of 'make verify' Based on patch 2816088 from Zack Weinberg | ||
| 17da042d | 2010-03-11 15:39:44 | Add some glass-box tests for the last_with_data code. | ||
| 6f47bd12 | 2010-03-10 23:28:51 | Remove previous_to_last from evbuffer | ||
| c8ac57f1 | 2010-03-10 23:24:14 | Use last_with_data in place of previous_to_last This actually makes some of the code a lot simpler. The only ones that actually used previous_to_last for anything were reserving and committing space. | ||
| 2a6d2a1e | 2010-03-10 22:16:14 | Revise evbuffer to add last_with_data This is the first patch in a series to replace previous_to_last with last_with_data. Currently, we can only use two partially empty chains at the end of an evbuffer, so if we have one with 511 bytes free, and another with 512 bytes free, and we try to do a 1024 byte read, we can't just stick another chain on the end: we need to reallocate the last one. That's stupid and inefficient. Instead, this patch adds a last_with_data pointer to eventually replace previous_to_last. Instead of pointing to the penultimated chain (if any) as previous_to_last does, last_with_data points to the last chain that has any data in it, if any. If all chains are empty, last_with_data points to the first chain. If there are no chains, last_with_data is NULL. The next step is to start using last_with_data everywhere that we currently use previous_to_last. When that's done, we can remove previous_to_last and the code that maintains it. | ||
| 2c2618d8 | 2010-03-05 13:00:15 | more whitespace normalization | ||
| c7cf6f00 | 2010-03-05 12:47:46 | Replace users of "int fd" with "evutil_socket_t fd" in portable code Remeber, win32 has a socket type that's actually a handle, so if there's a chance that code is run on win32, we can't use "int" as the socket type. This isn't a blind search-and-replace: sometimes an fd is really in fact for a file, and not a socket at all. | ||
| 17efc1cd | 2010-03-04 01:25:51 | Update all our copyright notices to say "2010" | ||
| 1273d2f5 | 2010-03-02 15:16:28 | VC has no getopt(), so do without in bench_http. | ||
| 4ac38a5c | 2010-03-02 14:34:30 | Get bench_http to work on Windows; add a switch to enable IOCP. | ||
| 7ffd3875 | 2010-02-24 13:40:06 | Delete stack-alloced event in new unit test before returning. | ||
| f3dfe462 | 2010-02-23 23:59:26 | Use new timeval diff comparison function in bufferevent test | ||
| 8fcb7a1b | 2010-02-23 23:55:32 | Add test for periodic timers that get activated for other reasons This was already independently verified by the new bufferevent timeout tests, but it's good to explicitly check that our code does what it should. | ||
| c02bfe12 | 2010-02-23 16:36:52 | Add a test for timeouts on filtering bufferevents. | ||
| d3288293 | 2010-02-20 18:44:35 | Provide consistent, tested semantics for bufferevent timeouts The different bufferevent implementations had different behavior for their timeouts. Some of them kept re-triggering the timeouts indefinitely; some disabled the event immediately the first time a timeout triggered. Some of them made the timeouts only count when the bufferevent was actively trying to read or write; some did not. The new behavior is modeled after old socket bufferevents, since they were here first and their behavior is relatively sane. Basically, each timeout disables the bufferevent's corresponding read or write operation when it fires. Timeouts are stopped whenever we suspend writing or reading, and reset whenever we unsuspend writing or reading. Calling bufferevent_enable resets a timeout, as does changing the timeout value. | ||
| 4faeaea9 | 2010-02-19 03:39:50 | Clean up formatting: function/keyword spacing consistency. - Keywords always have a space before a paren. Functions never do. - No more than 3 blank lines in a row. | ||
| e5bbd40a | 2010-02-18 17:41:15 | Clean up formatting: use tabs, not 8-spaces, to indent. | ||
| 8fdf09c0 | 2010-02-18 17:08:50 | Clean up formatting: Disallow space-before-tab. | ||
| b72be50d | 2010-02-18 13:52:04 | Add some headers to fix freebsd compilation | ||
| 48a29b68 | 2010-02-18 01:43:37 | Add a unit test for secure rng. Mostly, this is just to make sure our arc4random_buf() implementation isn't dumb. | ||
| ca46d25b | 2010-02-17 23:02:28 | Merge branch 'arc4random' | ||
| 2f782af3 | 2010-02-13 17:04:17 | validate close cb on server when client connection closes | ||
| e8a9782c | 2010-02-13 16:59:37 | clean up terminate_chunked test | ||
| d4de062e | 2010-02-10 17:19:18 | Add an arc4random implementation for use by evdns Previously, evdns was at the mercy of the user for providing a good entropy source; without one, it would be vulnerable to various active attacks. This patch adds a port of OpenBSD's arc4random() calls to Libevent [port by Chris Davis], and wraps it up a little bit so we can use it more safely. | ||
| 1dd7e6dc | 2010-02-05 01:16:23 | Remove the 'flags' argument from evdns_base_set_option() The 'flags' argument made sense when passed to evdns_(base_)?parse_resolv_conf when it said which parts of the resolv.conf file to obey. But for evdns_set_option(), it was really silly, since you wouldn't be calling evdns_set_option() unless you actually wanted to set the option. Its meaning was basically, "set this to DNS_OPTIONS_ALL unless you want a funny surprise." evdns_base_set_option was new in 2.0.1-alpha, so we aren't committed to keeping it source-compatible. | ||
| a7a94310 | 2010-02-03 23:49:22 | Fix some additional -DUNICODE issues on win32. Brodie's patch didn't catch the ones that were new since 1.4. | ||
| e2d15d81 | 2010-02-03 17:52:55 | Merge remote branch 'niels/http_chunk' | ||
| 93d73691 | 2010-02-03 14:34:56 | do not fail while sending on http connections the client closed. when sending chunked requests via multiple calls to evhttp_send_reply_chunk, the client may close the connection before the server is done sending. this used to cause a crash. we introduce a new function evhttp_request_get_connection() that allows the server to determine if the request is still associated with a connection. If it's not, evhttp_request_free() needs to be called explicitly or the user can call evhttp_send_reply_end() which just frees the request, too. | ||
| 60742d58 | 2010-02-03 17:01:45 | Add the rest of the integer limits, and add a test for them. | ||
| 5c7a7bca | 2010-01-23 20:07:05 | Fix windows and msvc build | ||
| 918e9c5e | 2010-01-23 16:38:36 | Fix a number of warnings from gcc -pedantic | ||
| e2ca403f | 2010-01-23 16:23:45 | Make it compile under gcc --std=c89. | ||
| 7296971b | 2009-12-29 16:38:03 | Detect setenv/unsetenv; skip main/base_environ test if we can't fake them. Previously, we assumed that we would have setenv/unsetenv everywhere but WIN32, where we could fake them with putenv. This isn't so: some other non-windows systems lack setenv/unsetenv, and some of them lack putenv too. The first part of the solution, then, is to detect setenv/unsetenv/ putenv from configure.in, and to fake setenv/unsetenv with putenv whenever we have the latter but not one of the former. But what should we do when we don't even have putenv? We could do elaborate tricks to manipulate the environ pointer, but since we're only doing this for the unit tests, let's just skip the one test in question that uses setenv/unsetenv. | ||
| 97a8c790 | 2010-01-22 00:34:21 | Fix compilation of rate-limit code when threading support is disabled | ||
| 8d4aaf90 | 2010-01-20 12:56:54 | Don't use a bind address for nameservers on loopback If the user sets a bind address to use for nameservers, and a nameserver happens to be on 127.0.0.1, the nameserver will generally fail. This patch alters this behavior so that the bind address is only applied when the nameserver is on a non-loopback address. | ||
| 78a50fe0 | 2010-01-14 17:39:54 | forgot to add void to test function | ||
| 26714ca1 | 2010-01-14 17:05:00 | add a test for evhttp_connection_base_new with a dns_base | ||
| b8226390 | 2010-01-14 16:53:25 | move dns utility functions into a separate file so that we can use them for http testing | ||
| a334b31c | 2010-01-14 14:46:16 | More unit tests for getaddrinfo_async: v4timeout and cancel. One covers the case where the v4 request times out but the v6 request doesn't. The other makes sure that cancelling a request actually works. | ||
| 94131e92 | 2010-01-12 15:58:36 | Fix test.sh on shells without echo -n Some systems have a version of /bin/sh whose builtin echo doesn't support the -n option used in test/test.sh. /bin/echo, however, usually does. This patch makes us use /bin/echo for echo -n whenever it is present. Also, our use of echo -n really only made sense when suppressing all test output. Since test output isn't suppressed when logging to a file, this pach makes us stop using echo -n when logging to a file. | ||
| 6cc79c6b | 2010-01-11 19:04:11 | Add unit-test for bad_request bug fixed in 1.4 recently. This is a partial forward-port from 4fd2dd9d83a000b6. There's no need to forward-port the bugfix, since the test passes with http.c as-is. I believe we fixed this while we were porting evhttp to bufferevent. --nickm | ||
| 72dd6667 | 2009-12-07 17:21:41 | evdns_getaddrinfo() now supports the /etc/hosts file. The regular blocking evutil_getaddrinfo() already supported /etc/hosts by falling back to getaddrinfo() or gethostbyname(). But evdns_getaddrinfo() had no such facility. Now it does. The data structure here isn't very clever. I guess people with huge /etc/hosts files will either need to get out of the 1980s, or submit a patch to this code so that it uses a hashtable instead of a linked list. Includes basic unit tests. | ||
| ba2945f9 | 2010-01-06 17:59:44 | Merge branch 'ratelimit' Conflicts: bufferevent_async.c | ||
| 165d30e3 | 2009-12-30 14:29:56 | Fix compilation of rate-limiting code on win32. | ||
| 885b4273 | 2009-12-30 13:50:52 | Fix test-ratelim compilation on Linux. I'd forgotten to include time.h, and to link against libm. | ||
| 0b151a9f | 2009-12-29 18:11:52 | Whitespace fixes in test.sh | ||
| 7dfbe94a | 2009-12-29 18:07:51 | Allow test.sh to be run as ./test/test.sh | ||
| c382de64 | 2009-12-29 17:59:55 | Allow the user to redirect the verbose output of test/test.sh to a file By default, the test.sh script still suppresses the output of all the tests it invokes. Now, however, you can have that output written to a file specified in the TEST_OUTPUT_FILE shell variable. | ||
| 1e56a32d | 2009-12-29 16:04:16 | Make the initial nameserver probe timeout configurable. When we decide that a nameserver is down, we stop sending queries to it, except to periodically probe it to see if it has come back up. Our previous probe sechedule was an ad-hoc and hard-wired "10 seconds, one minute, 5 minues, 15 minutes, 1 hour, 1 hour, 1 hour...". There was nothing wrong with having it be ad-hoc, but making it hard-wired served no good purpose. Now the user can set the initial timeout via a new "initial-probe-timeout:" option; future timeouts back off by a factor of 3 on every failure to a maximum of 1 hour. As a side-benefit, this lets us cut the runtime of the dns/retry test from about 40 seconds to about 3 seconds. Faster unit tests are always a good thing. | ||
| f0c0124e | 2009-12-23 07:54:13 | Testing code for bufferevent rate-limiting. This is not part of the regression tests, since running it necessarily takes a while. There is a new test-ratelim test; run it with '-h' for an argument to see its options. | ||
| 4a5b5343 | 2009-12-23 07:48:43 | Do not ignore bufferevent_enable(EV_READ) before bufferevent_connect(). Previously, we weren't remembering that we wanted to re-add the read event once the connect was finished. Now we are. | ||
| c51bb3c3 | 2009-12-21 16:36:40 | Fix a few locking issues on windows. | ||
| 70cdfe49 | 2009-12-06 02:59:19 | Fix compile on Snow Leopard with gcc warnings enabled | ||
| 7ae94450 | 2009-12-04 16:37:43 | Fix a snow leopard compile warning in the unit tests. Reported by Sebastian Hahn. | ||
| 31687b4d | 2009-12-02 01:22:07 | Fix regress_iocp.c usage of old lock allocation macros. | ||
| d84d8385 | 2009-11-27 15:24:32 | Fix two use-after-free bugs in unit tests spoted by lock debugging | ||
| 347952ff | 2009-11-27 15:20:43 | Revise the locking API: deprecate the old locking callbacks and add trylock. Previously, there was no good way to request different kinds of lock (say, read/write vs writeonly or recursive vs nonrecursive), or for a lock function to signal failure (which would be important for a trylock mode). This patch revises the lock API to be a bit more useful. The older lock calls are still supported for now. We also add a debugging mode to catch common errors in using the locking APIs. | ||
| 986500de | 2009-11-19 22:02:33 | nick found a race condition in the pthreads test case svn:r1554 | ||
| 7511b6a9 | 2009-11-19 00:21:38 | Fix a spelling error and remove some dead code svn:r1551 | ||
| 07ce7f99 | 2009-11-18 21:17:00 | Make our failing-connection bufferevent test more tolerant. I thought we had a way to do connect() that would never fail immediately, but always wait for a moment before failing. It turns out that on FreeBSD it can fail immediately. This is not FreeBSD's fault, or even a real bug anywhere but in the unit test. svn:r1549 | ||
| 9bf124bf | 2009-11-18 21:16:47 | Build correctly with mm replacement turned off. svn:r1547 | ||
| d7d1f1da | 2009-11-17 20:31:09 | Move responsibility for IOCP callback into bufferevent_async. This patch from Chris Davis saves some callback depth, and adds proper ref-counting to bufferevents when there's a deferred evbuffer callback inflight. It could use a couple more comments to really nail down what its invariants are. svn:r1543 | ||
| 625a261a | 2009-11-17 02:40:14 | OpenBSD demands that sys/types.h be included before sys/socket.h svn:r1539 | ||
| 888007f9 | 2009-11-17 02:38:19 | Windows *does* have getservbyname, no matter what autoconf says. TODO: figure out why autoconf is confused about this. svn:r1538 | ||
| 86f57420 | 2009-11-16 22:25:46 | Add two implementations of getaddrinfo: one blocking and one nonblocking. The entry points are evutil_getaddrinfo and evdns_getaddrinfo respectively. There are fairly extensive unit tests. I believe this code conforms to RFC3493 pretty closely, but there are probably more issues. It should get tested on more platforms. This code means we can dump the well-intentioned but weirdly-implemented bufferevent_evdns and evutil_resolve code. svn:r1537 | ||
| 72bafc17 | 2009-11-16 22:23:55 | Remove the stupid brokenness where DNS option names needed to end with a colon. svn:r1536 | ||
| c79a45e0 | 2009-11-14 21:54:30 | Fix a couple of event_debug calls. svn:r1527 | ||
| b2fe4aed | 2009-11-09 18:36:34 | Unit tests for got_break and got_exit. svn:r1521 | ||
| 693c24ef | 2009-11-09 17:16:30 | Implement queued timeouts for case where many timeouts are the same. Libevent's current timeout code is relatively optimized for the randomly scattered timeout case, where events are added with their timeouts in no particular order. We add and remove timeouts with O(lg n) behavior. Frequently, however, an application will want to have many timeouts of the same value. For example, we might have 1000 bufferevents, each with a 2 second timeout on reading or writing. If we knew this were always the case, we could just put timeouts in a queue and get O(1) add and remove behavior. Of course, a queue would give O(n) performance for a scattered timeout pattern, so we don't want to just switch the implementation. This patch gives the user the ability to explicitly tag certain timeout values as being "very common". These timeout values have a cookie encoded in the high bits of their tv_usec field to indicate which queue they belong on. The queues themselves are each triggered by an entry in the minheap. See the regress_main.c code for an example use. svn:r1517 | ||
| 784b8773 | 2009-11-06 21:46:57 | We do not work any more without an event-config.h; stop pretending that it is meaningful to check for HAVE_CONFIG_H svn:r1516 | ||
| ac633aeb | 2009-11-05 21:22:23 | Fix some build warnings on MSVC, mostly related to signed/unsigned comparisons. svn:r1510 | ||
| 4ca9efea | 2009-11-05 20:40:11 | Add nmake files to build with MSVC. Right now, they just make static libraries and unit tests. They probably set lots of options wrong. svn:r1507 | ||
| 25a5e681 | 2009-11-05 20:37:19 | Build fixes for MSVC svn:r1506 | ||
| 47bad8ab | 2009-11-04 20:17:32 | Implement size limits on HTTP header length and body length. Patch from Constantine Verutin, simplified a little. svn:r1500 | ||
| 86db1c85 | 2009-11-04 05:19:26 | Commit ConnectEx code to get connect working with async bufferevents. This is code by Chris Davis, with changes to get the unit tests failing less aggressively. The unit tests for this code do not completely pass yet; Chris is looking into that. If they aren't passing by the next release, I'll turn off this code. svn:r1499 | ||
| 0b9eb1bf | 2009-11-03 20:40:48 | Add a bufferevent function to resolve a name then connect to it. This function, bufferevent_socket_connect_hostname() can either use evdns to do the resolve, or use a new function (evutil_resolve) that uses getaddrinfo or gethostbyname, like http.c does now. This function is meant to eventually replace the hostname resolution mess in http.c. svn:r1496 | ||
| fcc7668c | 2009-11-03 20:05:06 | Fix one IOCP-callback signature I missed svn:r1495 | ||
| 0fd0255f | 2009-11-03 19:54:56 | Remove compat/sys/_time.h I've gone through everything that it declared to see where it was used, and it seems that we probably don't need it anywhere. Here's what it declared, and why I think we're okay dropping it. o struct timeval {} (Used all over, and we can't really get away with declaring it ourselves; we need the same definition the system uses. If we can't find struct timeval, we're pretty much sunk.) o struct timespec {} (Used in event.c, evdns.c, kqueue.c, evport.c. Of these, kqueue.c and event.c include sys/_time.h. event.c conditions its use on _EVENT_HAVE_CLOCK_GETTIME, and kqueue() only works if timespec is defined.) o TIMEVAL_TO_TIMESPEC (Used in kqueue.c, but every place with kqueue has sys/time.h) o struct timezone {} (event2/util.h has a forward declaration; only evutil.c references it and doesn't look at its contents.) o timerclear, timerisset, timercmp, timeradd, timersub (Everything now uses the evutil_timer* variants.) o ITIMER_REAL, ITIMER_VIRTUAL, ITIMER_PROF, struct itemerval (These are only used in test/regress.c, which does not include _time.h) o CLOCK_REALTIME (Only used in evdns.c, which does not include _time.h) o TIMESPEC_TO_TIMEVAL o DST_* o timespecclear, timespecisset, timespeccmp, timespecadd, timespecsub o struct clockinfo {} o CLOCK_VIRTUAL, CLOCK_PROF o TIMER_RELTIME, TIMER_ABSTIME (unused) svn:r1494 | ||
| 0aa6f513 | 2009-11-02 20:59:13 | Fix remaining AcceptEx issues. svn:r1492 | ||
| e794d716 | 2009-11-02 20:20:40 | Clean up acceptex code some more: add locking, single-threading, enable/disable. svn:r1491 | ||
| 9a772148 | 2009-11-02 19:31:29 | Compilation and correctness fixes for IOCP listener code. svn:r1489 | ||
| 8283b2f0 | 2009-11-02 19:30:25 | Fix a major parenthesis bug in EVUTIL_UPCAST. Fortunately, this didn't hurt anything previously, since we had no actual users of the macro where the offset of the base type wasn't 0. svn:r1488 | ||
| 5f1d6e64 | 2009-11-02 17:42:16 | Add more IOCP tests. They might not pass yet. svn:r1487 | ||
| 96c6956e | 2009-10-30 22:43:30 | Add a "many events" regression test. This is a glass-box test to get more coverage on the event loop backends. We've run into bugs here before with fencepost errors, and it turns out that none of our unit tests had enough events to exercise the resize code. Most of the backends have some kind of logic that resizes an array when: - The highest fd is too high - The number of events added since the last iteration of the loop is too high - The number of active events is too high. This test hits all 3 cases, and increases coverage in select.c by 7%, in poll by 1%, and in kqueue by 9%. svn:r1482 | ||
| 9976f1e7 | 2009-10-29 17:11:12 | reformat weird indentation in dns tests svn:r1478 | ||
| 3c2198cb | 2009-10-29 17:10:36 | Unit test for reverse ipv6 lookup svn:r1477 | ||
| 5b3fb5bf | 2009-10-29 16:35:20 | More documentation and unit tests for event_tagging. svn:r1476 |