summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* | | Avoid spurious reads from just-created open openssl buffereventsNick Mathewson2010-10-14
| | | | | | | | | | | | | | | | | | | | | When handshaking, we listen for reads or writes from the transport. But when we're connected, we start out with writes enabled and reads disabled, which means we should not have the transport read for us.
* | | The corrected bufferevent filter semantics let us fix our openssl testsNick Mathewson2010-10-14
| | |
* | | Correct logic on disabling underlying bufferevents when disabling a filterNick Mathewson2010-10-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, whenever writing was disabled on a bufferevent_filter (or a filtering SSL bufferevent), we would stop writing on the underlying bufferevent. This would make for trouble, though, since if you implemented common patterns like "stop writing once data X has been flushed", your bufferevent filter would disable the underlying bufferevent after the data was flushed to the underlying bufferevent, but before actually having it written to the network. Now, we have filters leave their underlying bufferevents enabled for reading and writing for reading and writing immediately. They are not disabled, unless the user wants to disable them, which is now allowed. To handle the case where we want to choke reading on the underlying bufferevent because the filter no longer wants to read, we use bufferevent_suspend_read(). This is analogous to the way that we use bufferevent_suspend_write() to suspend writing on a filtering bufferevent when the underlying bufferevent's output buffer has hit its high watermark.
* | | Fix serious bugs in per-bufferevent rate-limiting codeNick Mathewson2010-10-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our old code was too zealous about deleting the refill events that would actually make connections able to read or write again after they had run out of bandwidth. Under some circumstances, this could cause a bufferevent to never actually refill one of its rate-limiting buckets. Also, the code treated setting a per-connection rate-limit on a connection that already had a group-limit as if it were changing the limit on a connection whose allocation had already run out. This patch fixes both of those problems.
* | | Handle rate-limiting for reading on OpenSSL bufferevents correctly.Nick Mathewson2010-10-12
| | | | | | | | | | | | | | | | | | We were looking at the number of bytes read on the wbio, not in the rbio. But these are usually different BIOs, and the reading is supposed to happen on the rbio.
* | | Merge branch '20_internal_prio'Nick Mathewson2010-10-09
|\ \ \
| * | | Put internal events at highest priorityNick Mathewson2010-09-17
| | | | | | | | | | | | | | | | | | | | (If we allow user events to starve internal events, then internal events never actually happen, signals don't get acked, etc)
* | | | Merge branch 'iovmax'Nick Mathewson2010-10-07
|\ \ \ \
| * | | | Fix an EINVAL on evbuffer_write_iovec on OpenSolaris.Nick Mathewson2010-10-06
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The writev() call is limited to at most IOV_MAX iovecs (or UIO_MAXIOV, depending on whom you ask). This isn't a problem anywhere we've tested except on OpenSolaris, where IOV_MAX was a mere 16. This patch makes us go from "use up to 128 iovecs when writing" to "use up to 128 iovecs when writing, or IOV_MAX/UIO_MAXIOV, whichever is less". This is still wrong if you somehow find a platform that defines IOV_MAX < UIO_MAXIOV, but I hereby claim that such a platform is too stupid to worry about for now. Found by Michael Herf.
* | | | Turn some booleans in evconnlistener_iocp into one-bit bitfields.Nick Mathewson2010-10-07
| | | |
* | | | Make iocp/listener/error work; don't accept again if lev is disabled.Christopher Davis2010-10-07
| | | |
* | | | Fix allocation error for IOCP listeners. Probably harmless, since struct ↵Nick Mathewson2010-10-07
| | | | | | | | | | | | | | | | event is big
* | | | Add a LEV_OPT_THREADSAFE option for threadsafe evconnlistenersNick Mathewson2010-10-07
|/ / /
* | | Fix warnings on mingw with gcc 4.5Nick Mathewson2010-10-05
| | |
* | | Define symbolic constants to use in place of SHUT_RD etcNick Mathewson2010-10-05
| | |
* | | Send a shutdown(SHUT_WR) before closing an http connectionChristopher Davis2010-10-05
| | | | | | | | | | | | | | | | | | This avoids getting an ECONNRESET from the TCP stack. Fixes bug 2928690
* | | Fix a spurious-call bug on epoll.cNick Mathewson2010-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were trying to check whether any events had really been notified on an fd before calling evmap_io_active on it, but instead we were checking for an event pointer, which was always true. In practice, this patch shouldn't change much, since epoll_wait shouldn't return an event unless there is actually an event going on. Spotted by an anonymous bug reporter on Sourceforge. Closes bug 3078425.
* | | Merge remote branch 'github/signed_compare'Nick Mathewson2010-09-28
|\ \ \
| * | | Fix all warnings in the main codebase flagged by -Wsigned-compareNick Mathewson2010-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remember, the code int is_less_than(int a, unsigned b) { return a < b; } is buggy, since the C integer promotion rules basically turn it into int is_less_than(int a, unsigned b) { return ((unsigned)a) < b; } and we really want something closer to int is_less_than(int a, unsigned b) { return a < 0 || ((unsigned)a) < b; } . Suggested by an example from Ralph Castain
* | | | Merge remote branch 'github/win_lib'Nick Mathewson2010-09-27
|\ \ \ \
| * | | | Do not search outside of the system directory for windows DLLsNick Mathewson2010-09-27
| |/ / / | | | | | | | | | | | | Hardens against some attacks.
* | | | Fix compile in kqueue.ckqueue_compileSebastian Hahn2010-09-27
|/ / / | | | | | | | | | | | | Commit 38d09606 removed the evsigbase pointer, but forgot to remove an assignment to it in kqueue.c.
* | | Unit tests for listener error callbacksNick Mathewson2010-09-23
| | |
* | | Add error callback to evconnlistenerSimon Perreault2010-09-22
| | |
* | | Make event.c debugging messages report fdsNick Mathewson2010-09-21
| | |
* | | Make debugging output for epoll backend more comprehensiveNick Mathewson2010-09-21
| | |
* | | Remove event_base.evsigbase; nothing used it.Nick Mathewson2010-09-15
| | |
* | | Remove the now-useless evsig_caught and evsig_processNick Mathewson2010-09-15
| | |
* | | Make default signal backend fully threadsafeNick Mathewson2010-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jason Toffaletti discovered with helgrind that our signal handler was messing with evsig_base, which can be set from lots of places in the code. Ordinarly, we'd just stick a lock on it, except that it is illegal (and genuinely error-prone) to call pthread_mutex_acquire() from inside a signal handler. The solution is to only store the fd we write to in a static variable, write the signal number to the fd, and put evsig_cb in charge of activating signal events. I have no idea how we'll cope if we want to enable this to handle siginfo (where available) in the future.
* | | Warn when using the error-prone EV_SIGNAL interface in an error-prone way. ↵Nick Mathewson2010-09-15
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, fix a couple of race conditions in signal.c When using the signal.c signal backend, Libevent currently only allows one event_base to actually receive signals at a time. (This has been the behavior since at least 1.4 and probably much earlier.) Now, we detect and warn if you're likely to be racing about which signal goes to which thread. We also add a lock to control modifications of the evsig_base field, to avoid race conditions like those found by Jason Toffaletti. Also, more comments. Comments are good.
* | Obey enabled status when unsuspendingSimon Perreault2010-09-10
| |
* | Bump to the latest version of tinytestNick Mathewson2010-09-09
| | | | | | | | | | | | This lets us do without libevent-specific code in tinytest.c, and lets us add a feature to skip individual tests from the command line.
* | Make SSL tests cover enabling/disabling EV_READ.Nick Mathewson2010-09-09
| | | | | | | | I want my 80% coverage.
* | Bump version to 2.0.7-rc-devNick Mathewson2010-09-09
| |
* | Make all versioning changes for 2.0.7-rc, and add ChangeLogNick Mathewson2010-09-09
| |
* | Make event_base_virtual_del() notify the base if neededChristopher Davis2010-09-09
| |
* | Add a missing time.h include to test/regress_thread.cNick Mathewson2010-09-09
| |
* | Fix an uninitialized-variable warning on windowsNick Mathewson2010-09-09
| |
* | Don't decrement virutal event count twice in connect_complete.Christopher Davis2010-09-08
| |
* | Fix a few Windows compile warnings.Christopher Davis2010-09-08
| |
* | Merge branch 'tests'Nick Mathewson2010-09-08
|\ \
| * | Fix a few memory leaks in the testsNick Mathewson2010-09-07
| | |
* | | Merge remote branch 'github/win_notify'Nick Mathewson2010-09-08
|\ \ \
| * | | Implement EVBASE_NEED_NOTIFY on win32Nick Mathewson2010-09-08
| | | |
* | | | Add a missing header for regress_thread.cNick Mathewson2010-09-08
|/ / /
* | | Fix a compile warning in regress_thread.cSebastian Hahn2010-09-08
| | |
* | | Merge remote branch 'chrisd/iocp-fixes4'Nick Mathewson2010-09-08
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: test/regress_thread.c
| * | | Only process up to MAX_DEFERRED deferred_cbs at a time.Christopher Davis2010-09-08
| | | | | | | | | | | | | | | | | | | | | | | | If threads queue callbacks while event_process_deferred_callbacks is running, the loop may spin long enough to significantly skew timers. A unit test stressing this behavior is also in this commit.
| * | | Add event_config_set_num_cpus_hint for tuning thread pools, etc.Christopher Davis2010-09-08
| | | |
| * | | IOCP-related unit test tweaksChristopher Davis2010-09-08
| | | |