aboutsummaryrefslogtreecommitdiff
path: root/src/common/compat_libevent.c
AgeCommit message (Collapse)Author
2012-06-15Whitespace fixNick Mathewson
2012-06-15Move tor_gettimeofday_cached() into compat_libeventNick Mathewson
2012-06-04Update copyright dates to 2012; add a few missing copyright statementsNick Mathewson
2012-06-04Add about 60 more DOCDOC comments to 0.2.3Nick Mathewson
Also, try to resolve some doxygen issues. First, define a magic "This is doxygen!" macro so that we take the correct branch in various #if/#else/#endifs in order to get the right documentation. Second, add in a few grouping @{ and @} entries in order to get some variables and fields to get grouped together.
2012-01-31Use the standard _WIN32, not the Torism MS_WINDOWS or deprecated WIN32Nick Mathewson
This commit is completely mechanical; I used this perl script to make it: #!/usr/bin/perl -w -i.bak -p if (/^\s*\#/) { s/MS_WINDOWS/_WIN32/g; s/\bWIN32\b/_WIN32/g; }
2011-12-08appease check-spacesSebastian Hahn
This re-applies f77f9bddb8bf0dd6e9c3e0d94269aa23f459a272 which got accidentally reverted in 53f535aeb863204470379b2da4631770fa10b13f. Thanks asn for spotting this.
2011-12-06Revert "Use callback-driven approach to block renegotiations."Nick Mathewson
This reverts commit 406ae1ba5ad529a4d0e710229dab6ed645d42b50.
2011-12-06Revert "appease check-spaces"Nick Mathewson
This reverts commit f77f9bddb8bf0dd6e9c3e0d94269aa23f459a272.
2011-12-06Revert "Refactor tor_event_base_once to do what we actually want"Nick Mathewson
This reverts commit 7920ea55b8d994268d2b07f27316b0f34d8f27e5.
2011-12-06Revert "use event_free() wrapper; fix bug 4582"Nick Mathewson
This reverts commit 9a88c0cd32df53116a6bbb6b961650943755061c.
2011-12-06Revert "Make pending libevent actions cancelable"Nick Mathewson
This reverts commit aba25a6939a5907d40dbcff7433a8c130ffd12ad.
2011-11-29Make pending libevent actions cancelableNick Mathewson
This avoids a dangling pointer issue in the 3412 code, and should fix bug 4599.
2011-11-25use event_free() wrapper; fix bug 4582Nick Mathewson
2011-11-25Refactor tor_event_base_once to do what we actually wantNick Mathewson
This version avoids the timeout system entirely, gives a nicer interface, and lets us manage allocation explicitly.
2011-11-25Merge remote-tracking branch 'asn/bug4312'Nick Mathewson
2011-11-24appease check-spacesSebastian Hahn
2011-11-14Disable IOCP and retry event_base_new_with_config once on failureNick Mathewson
This is a fancier bug4457 workaround for 0.2.3. In 0.2.2, we could just tell Libevent "Don't enable locking!" so it wouldn't try to make the event_base notifiable. But for IOCP, we need a notifiable base. (Eventually, we'll want a notifiable base for other stuff, like multithreaded crypto.) So the solution is to try a full-featured initialization, and then retry with all the options turned off if that fails.
2011-11-14Merge remote-tracking branch 'public/bug4457_022' into bug4457_masterNick Mathewson
Conflicts: src/common/compat_libevent.c Resolving conflict by not taking 7363eae13cb8 ("Use the EVENT_BASE_FLAG_NOLOCK flag to prevent socketpair() invocation"): in Tor 0.2.3.x, we _do_ sometimes use notifiable event bases.
2011-11-14Detect failure from event_init() or event_base_new_with_config()Nick Mathewson
2011-11-14Use the EVENT_BASE_FLAG_NOLOCK flag to prevent socketpair() invocationNick Mathewson
In Tor 0.2.2, we never need the event base to be notifiable, since we don't call it from other threads. This is a workaround for bug 4457, which is not actually a Tor bug IMO.
2011-11-13Use callback-driven approach to block renegotiations.George Kadianakis
Also use this new approach in the bufferevents-enabled case.
2011-09-22Make bufferevents work with TokenBucketRefillIntervalNick Mathewson
2011-08-24Apply rate-limiting to the lowest bufferevent in the stack.Nick Mathewson
When we're doing filtering ssl bufferevents, we want the rate-limits to apply to the lowest level of the bufferevent stack, so that we're actually limiting bytes sent on the network. Otherwise, we'll read from the network aggressively, and only limit stuff as we process it.
2011-08-18Automatically use filtering bufferevents with IOCP.Nick Mathewson
2011-08-17Call evthread_use_windows_threads when running with IOCP on windowsNick Mathewson
2011-07-01Replace 4 more sscanf()s with tor_sscanf()Nick Mathewson
For some inexplicable reason, Coverity departs from its usual standards of avoiding false positives here, and warns about all sscanf usage, even when the formatting strings are totally safe. Addresses CID # 447, 446.
2011-05-23Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
Conflicts: src/common/Makefile.am src/or/control.c
2011-05-12Fix comment typoRobert Ransom
2011-04-07Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
Conflicts: src/common/address.c src/common/compat_libevent.c src/common/memarea.c src/common/util.h src/or/buffers.c src/or/circuitbuild.c src/or/circuituse.c src/or/connection.c src/or/directory.c src/or/networkstatus.c src/or/or.h src/or/routerlist.c
2011-03-25Clean up a comment-conversation about bad libevent version/method combosNick Mathewson
2011-03-16Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-03-16Resolve the one DOCDOC in the 0.2.2 code atmNick Mathewson
2011-03-16Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
Trivial Conflicts in src/common/crypto.c src/or/main.h src/or/or.h
2011-03-16Doxygen documentation for about 100 things that didn't have anyNick Mathewson
About 860 doxygen-less things remain in 0.2.2
2011-01-03Merge remote branch 'origin/maint-0.2.2'Nick Mathewson
2011-01-03Bump copyright statements to 2011 (0.2.2)Nick Mathewson
2010-12-21Merge remote branch 'origin/maint-0.2.2'Nick Mathewson
2010-12-16Turn on epoll changelists with libevent 2.0.9-rc and laterNick Mathewson
Libevent 2.0 has a "changelist" feature that avoids making redundant syscalls if we wind up doing a lot of event_add/event_del operations on the same fd in a row. Unfortunately, due to a weird design choice in Linux, it doesn't work right with epoll when multiple fds refer to the same socket (e.g., one is a dup() of the other). We don't dup() anything we give to Libevent, though, so it is safe for us to explicitly turn this feature on.
2010-11-19Do not send Libevent log messages to a controller.Nick Mathewson
Doing so could make Libevent call Libevent from inside a Libevent logging call, which is a recipe for reentrant confusion and hard-to-debug crashes. This would especially hurt if Libevent debug-level logging is enabled AND the user has a controller watching for low-severity log messages. Fix bug 2190; fix on 0.1.0.2-rc.
2010-10-15Fix one-time memory leak when initializing libevent. Spotted by SebastianNick Mathewson
2010-10-15Fix an apostrophe in a commentNick Mathewson
2010-10-15Fix an xxx wrt picking libevent methods known-to-workNick Mathewson
The short version is, "where we want to do it, we have nothing real to chose from and we can't do it easily. Where it's easy to do, we have no reason to do it yet."
2010-09-29make c612ddee compile with old libeventsRoger Dingledine
2010-09-28Add a new option to enable/disable IOCP supportNick Mathewson
2010-09-27Fix whitespace in bufferevents branchNick Mathewson
2010-09-27Some bufferevents related fixes and pointers for nickmSebastian Hahn
2010-09-27Convert bufferevents to use rate-limiting.Nick Mathewson
This requires the latest Git version of Libevent as of 24 March 2010. In the future, we'll just say it requires Libevent 2.0.5-alpha or later. Since Libevent doesn't yet support hierarchical rate limit groups, there isn't yet support for tracking relayed-bytes separately when using the bufferevent system. If a future version does add support for hierarchical buckets, we can add that back in.
2010-07-27whitespace fixSebastian Hahn
2010-07-26Make sure we don't warn for libevent versions like 1.4.14b-stableSebastian Hahn
2010-07-09Rename log.h to torlog.hNick Mathewson
This should make us conflict less with system files named "log.h". Yes, we shouldn't have been conflicting with those anyway, but some people's compilers act very oddly. The actual change was done with one "git mv", by editing Makefile.am, and running find . -name '*.[ch]' | xargs perl -i -pe 'if (/^#include.*\Wlog.h/) {s/log.h/torlog.h/; }'