aboutsummaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2015-02-02Merge remote-tracking branch 'public/bug13319'Nick Mathewson
2015-02-02Merge remote-tracking branch 'public/14188_part1'Nick Mathewson
2015-01-30Fix: check r < 0 before checking errnoDavid Goulet
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-30Fix possible infinite loop on pipe/sock_drain()David Goulet
If the returned value of read/recv is 0 (meaning EOF), we'll end up in an infinite loop (active wait) until something is written on the pipe which is not really what we want here especially because those functions are called from the main thread. Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-30Merge remote-tracking branch 'public/prop227_v2'Nick Mathewson
Conflicts: src/test/test_dir.c
2015-01-28Bug #8405: Report SOCKS username/password in CIRC status eventsArthur Edelstein
Introduces two new circuit status name-value parameters: SOCKS_USERNAME and SOCKS_PASSWORD. Values are enclosing in quotes and unusual characters are escaped. Example: 650 CIRC 5 EXTENDED [...] SOCKS_USERNAME="my_username" SOCKS_PASSWORD="my_password"
2015-01-28Try to work around changes in openssl 1.1.0Nick Mathewson
Prefer not to use a couple of deprecated functions; include more headers in tortls.c This is part of ticket 14188.
2015-01-23Merge branch 'if_addr_refactoring_squashed'Nick Mathewson
Conflicts: src/test/include.am src/test/test.c
2015-01-23Refactor code that looks up addresses from interfacesrl1987
Now the code has separate implementation and examination functions, uses smartlists sanely, and has relatively decent test coverage.
2015-01-22fix some warnings in compat_threads.cNick Mathewson
2015-01-22Move a redundant _GNU_SOURCE to where it is not redundantNick Mathewson
2015-01-21use the correct free fn. spotted by dgouletNick Mathewson
2015-01-21Merge branch 'better_workqueue_v3_squashed'Nick Mathewson
2015-01-21Support monotonic time for pthread_cond_timedwaitDavid Goulet
This is to avoid that the pthread_cond_timedwait() is not affected by time adjustment which could make the waiting period very long or very short which is not what we want in any cases. Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-21Fix up some workqueue/threading issues spotted by dgoulet.Nick Mathewson
2015-01-21handle EINTR in compat_*threads.cNick Mathewson
2015-01-15Ignore warning for redundant decl in openssl/srtp.hNick Mathewson
Backports some commits from tor master.
2015-01-15Update workqueue implementation to use a single queue for the workNick Mathewson
Previously I used one queue per worker; now I use one queue for everyone. The "broadcast" code is gone, replaced with an idempotent 'update' operation.
2015-01-15Restrict sample values of the Laplace distribution to int64_t.George Kadianakis
This helps avoid undefined behavior from casting big double values to int64_t. Fixes #14090.
2015-01-14Incorporate some comments based on notes from dgouletNick Mathewson
2015-01-14Refactor cpuworker to use workqueue/threadpool code.Nick Mathewson
2015-01-14Fix check-spacesNick Mathewson
2015-01-14Test and fix workqueue_entry_cancel().Nick Mathewson
2015-01-14"Recursive" locks, not "reentrant" locks. Duh.Nick Mathewson
2015-01-14Use correct (absolute) time for pthread_cond_timedwaitNick Mathewson
2015-01-14Fix windows compilation of condition codeNick Mathewson
2015-01-14Fix linux compilation (pipe2 needs _GNU_SOURCE)Nick Mathewson
2015-01-14Test a little more of compat_threads.cNick Mathewson
2015-01-14Rename mutex_for_cond -> mutex_nonreentrantNick Mathewson
We'll want to use these for other stuff too.
2015-01-14Documentation for new workqueue and condition and locking stuffNick Mathewson
2015-01-14Add a way to tell all threads to do something.Nick Mathewson
2015-01-14Isolate the "socketpair or a pipe" logic for alerting main threadNick Mathewson
This way we can use the linux eventfd extension where available. Using EVFILT_USER on the BSDs will be a teeny bit trickier, and will require libevent hacking.
2015-01-14Make pending work cancellable.Nick Mathewson
2015-01-14Initial workqueue implemention, with a simple test.Nick Mathewson
It seems to be working, but more tuning is needed.
2015-01-14Specialize handling for mutexes allocated for condition variablesNick Mathewson
(These must not be reentrant mutexes with pthreads.)
2015-01-14Add tor_cond_init/uninitNick Mathewson
2015-01-14Add a timeout to tor_cond_wait; add tor_cond impl from libeventNick Mathewson
The windows code may need some tweaks for it to compile; I've not tested it yet.
2015-01-14Split threading-related code out of compat.cNick Mathewson
Also, re-enable the #if'd out condition-variable code. Work queues are going to make us hack on all of this stuff a bit more closely, so it might not be a terrible idea to make it easier to hack.
2015-01-13Merge remote-tracking branch 'andrea/ticket12585_v3'Nick Mathewson
2015-01-12Merge remote-tracking branch 'teor/bug13111-empty-key-files-fn-empty'Nick Mathewson
2015-01-12src/common/compat_libevent.h: include testsupport.hAnthony G. Basile
When tor is configured with --enable-bufferevents, the build fails because compat_libevent.h makes use of the macro MOCK_DECL() which is defined in testsupport.h, but not included. We add the include.
2015-01-10Fix tortls.c build with GCC<4.6Nick Mathewson
apparantly, "pragma GCC diagnostic push/pop" don't exist with older versions. Fixes bug in 740e592790f570c446cbb5e6d4a77f842f75; bug not in any released Tor.
2015-01-10Ignore warning for redundant decl in openssl/srtp.hNick Mathewson
2015-01-10Merge remote-tracking branch 'teor/fix-typos'Nick Mathewson
2015-01-10More documentation for proposal 227 workNick Mathewson
2015-01-10Implement proposal 227-vote-on-package-fingerprints.txtNick Mathewson
This implementation includes tests and a little documentation.
2015-01-10Merge branch 'master' of https://git.torproject.org/tor into ↵teor
bug13111-empty-key-files-fn-empty Conflicts: src/or/connection_edge.c Merged in favour of origin.
2015-01-10Merge branch 'bug14001-clang-warning' into bug13111-empty-key-files-fn-emptyteor
Conflicts: src/or/router.c Choose newer comment. Merge changes to comment and function invocation.
2015-01-10Fix a minor misspelling in util.cteor
2015-01-09Rewrite the logic for deciding when to drop old/superseded certificatesNick Mathewson
Fixes bug 11454, where we would keep around a superseded descriptor if the descriptor replacing it wasn't at least a week later. Bugfix on 0.2.1.8-alpha. Fixes bug 11457, where a certificate with a publication time in the future could make us discard existing (and subsequent!) certificates with correct publication times. Bugfix on 0.2.0.3-alpha.