summaryrefslogtreecommitdiff
path: root/src/or/cpuworker.c
AgeCommit message (Collapse)Author
2011-05-23Use a 64-bit type to hold sockets on win64.Nick Mathewson
On win64, sockets are of type UINT_PTR; on win32 they're u_int; elsewhere they're int. The correct windows way to check a socket for being set is to compare it with INVALID_SOCKET; elsewhere you see if it is negative. On Libevent 2, all callbacks take sockets as evutil_socket_t; we've been passing them int. This patch should fix compilation and correctness when built for 64-bit windows. Fixes bug 3270.
2011-01-03Merge remote branch 'sebastian/bug2314' into maint-0.2.2Nick Mathewson
2011-01-03Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson
Conflicts: src/common/test.h src/or/test.c
2011-01-03Bump copyright statements to 2011Nick Mathewson
2010-12-27Fix compile wanrings revealed by gcc 4.5 on mingwSebastian Hahn
2010-11-10Synx manpage and source wrt option capitalizationSebastian Hahn
We had a spelling discrepancy between the manpage and the source code for some option. Resolve these in favor of the manpage, because it makes more sense (for example, HTTP should be capitalized).
2010-08-16Fix misplaced labelsSebastian Hahn
2010-07-27Create onion.hSebastian Hahn
2010-07-27Create main.hSebastian Hahn
2010-07-27Create control.hSebastian Hahn
2010-07-27Create connection.hSebastian Hahn
2010-07-27Create config.hSebastian Hahn
2010-07-27Create circuitlist.hSebastian Hahn
2010-07-27Create circuitbuild.hSebastian Hahn
2010-07-27Create buffers.hSebastian Hahn
2010-07-27Create router.hSebastian Hahn
2010-02-27Update Tor Project copyright yearsNick Mathewson
2009-07-27Don't leak memory if we get too many create cellsRoger Dingledine
Specifically, every time we get a create cell but we have so many already queued that we refuse it. Bugfix on 0.2.0.19-alpha; fixes bug 1034. Reported by BarkerJr.
2009-05-04Update copyright to 2009.Karsten Loesing
2009-03-02Add and use set/get_uint64 on onion tags. [bug 604; backportable]Nick Mathewson
It seems that 64-bit Sparc Solaris demands 64-bit-aligned access to uint64_t, but does not 64-bit-align the stack-allocated char array we use for cpuworker tags. So this patch adds a set/get_uint64 pair, and uses them to access the conn_id field in the tag. svn:r18743
2009-01-06When a relay gets a create cell it can't decrypt (e.g. because it'sRoger Dingledine
using the wrong onion key), we were dropping it and letting the client time out. Now actually answer with a destroy cell. Bugfix on 0.0.2pre8. svn:r17970
2009-01-04Remove svn $Id$s from our source, and remove tor --version --version.Nick Mathewson
The subversion $Id$ fields made every commit force a rebuild of whatever file got committed. They were not actually useful for telling the version of Tor files in the wild. svn:r17867
2008-08-15Switch global_identifier on connections to a 64-bit field and move it to ↵Nick Mathewson
connection_t. When procession onionskins, look up the connection by this field rather than by addr:port. This will keep us from dropping onionskins. How many dropped circuits are dropped because of this bug? svn:r16558
2008-08-05 r17641@31-33-44: nickm | 2008-08-05 16:07:53 -0400Nick Mathewson
Initial conversion of uint32_t addr to tor_addr_t addr in connection_t and related types. Most of the Tor wire formats using these new types are in, but the code to generate and use it is not. This is a big patch. Let me know what it breaks for you. svn:r16435
2008-07-23 r17322@aud-055: nickm | 2008-07-23 16:50:50 +0200Nick Mathewson
Make circid_t and streamid_t get used instead of uint16_t; it is possible we will soon want to make circid_t change to uint32_t. svn:r16155
2008-02-22 r14399@tombo: nickm | 2008-02-22 14:09:38 -0500Nick Mathewson
More 64-to-32 fixes. Partial backport candidate. still not done. svn:r13680
2008-02-07Update some copyright notices: it is now 2008.Nick Mathewson
svn:r13412
2008-02-06 r17947@catbus: nickm | 2008-02-06 11:57:53 -0500Nick Mathewson
Fix a bunch of DOCDOC items; document the --quiet flag; refactor a couple of XXXX020 items. svn:r13405
2008-02-05 r17930@catbus: nickm | 2008-02-05 18:20:40 -0500Nick Mathewson
Initial attempts to track down bug 600, and refactor possibly offending code. 1) complain early if circuit state is set to OPEN when an onionskin is pending. 2) refactor onionskin field into one only used when n_conn is pending, and a separate onionskin field waiting for attention by a cpuworker. This might even fix the bug. More likely, it will make it fail with a more useful core. svn:r13394
2007-12-12clean up copyrights, and assign 2007 copyrights to The Tor Project, IncRoger Dingledine
svn:r12786
2007-06-05 r13266@catbus: nickm | 2007-06-05 16:38:08 -0400Nick Mathewson
Patch from peter palfrader: control interface via unix domain socket svn:r10504
2007-05-22 r12853@catbus: nickm | 2007-05-22 11:36:54 -0400Nick Mathewson
Make connection_array into a smartlist. svn:r10292
2007-05-15 r12764@catbus: nickm | 2007-05-15 17:17:39 -0400Nick Mathewson
Enable (and cope with) more GCC 4.2 warnings. svn:r10196
2007-03-04 r12074@catbus: nickm | 2007-03-04 15:11:43 -0500Nick Mathewson
Make all LD_BUG log messsages get prefixed with "Bug: ". Remove manually-generated "Bug: "s from log-messages. (Apparently, we remembered to add them about 40% of the time.) svn:r9733
2007-02-12 r11775@catbus: nickm | 2007-02-12 16:39:09 -0500Nick Mathewson
Update copyright dates. svn:r9570
2006-09-29 r9025@Kushana: nickm | 2006-09-29 18:33:13 -0400Nick Mathewson
Differentiate more duplicated log entries svn:r8542
2006-09-29 r9023@Kushana: nickm | 2006-09-29 17:27:24 -0400Nick Mathewson
Make distinct all non-bug messages at notice or higher that appear 3 or more times. svn:r8541
2006-09-06 r8725@Kushana: nickm | 2006-09-06 04:39:29 -0400Nick Mathewson
spawn_func fixes: have cpuworker_main and dnsworker_main confirm to the right interfaces [casting func to void* is icky]. Also, make pthread_create() build without warnings. svn:r8327
2006-09-06- made configure check if we are building for win32Mike Chiussi
- made configure link to required system dll's if building for win32 - added diffs for libevent 1.1b - forced user to turn off eventdns if win32 is set - cleaned up tor_mmap_file()_win32 (not sure if it's stable) - cleaned up some warnings and typos svn:r8322
2006-07-26 r6908@Kushana: nickm | 2006-07-26 12:38:52 -0400Nick Mathewson
Refactor connection_t into edge, or, dir, control, and base subtypes. This might save some RAM on busy exit servers, but really matters most in terms of correctness. svn:r6906
2006-07-23Don't tell anybody, but we're going OO here. This patch splitsNick Mathewson
circuit_t into origin_circuit_t and or_circuit_t. I fixed some segaults; there may be more. We still need to move more rendezvous stuff into subtypes. This is a trial run for splitting up connection_t; if the approach is insane, please say so soon so we can do something smarter. Also, this discards the old HALF_OPEN code, which nobody seems to want. svn:r6817
2006-06-12Finally solve the "closing wedged cpuworkers" bug. Woo.Roger Dingledine
This happened when we got two create cells in a row from the same TLS connection. It would hand one to the cpuworker, and then immediately handle the second one -- after it had registered that the first one was busy, but before it had updated the timestamp that we use to decide how *long* it's been busy. svn:r6606
2006-06-06We got an obscure report of an assert error on a windows Tor server withRoger Dingledine
connection_add being called with socket = -1. The only places I can see where that happen would be if our tor_socketpair succeeds but it hands back negative values for some of its file descriptors. Perhaps this will produce more useful assert errors next time. svn:r6550
2006-04-18Raise the timeout for complaining about wedged cpuworkers.Roger Dingledine
This value is high because some servers with low memory/cpu sometimes spend an hour or more swapping, and Tor starves. svn:r6406
2006-03-12More cleanups noticed by weasel; also, remove macros that nobody uses.Nick Mathewson
svn:r6143
2006-03-12Cleanup on time-relaqted constants. New conventions:Nick Mathewson
1) Surround all constants by (parens), whether we'll be using them in a denominator or not. 2) Express all time periods as products (24*60*60), not as multiplied-out constants (86400). 3) Comments like "(60*60) /* one hour */" are as pointless as comments like "c = a + b; /* set c to the sum of a and b */". Remove them. 4) All time periods should be #defined constants, not given inline. 5) All time periods should have doxygen comments. 6) All time periods, unless specified, are in seconds. It's not necessary to say so. To summarize, the old (lack of) style would allow: #define FOO_RETRY_INTERVAL 60*60 /* one hour (seconds) */ next_try = now + 3600; The new style is: /** How often do we reattempt foo? */ #define FOO_RETRY_INTERVAL (60*60) next_try = now + RETRY_INTERVAL; svn:r6142
2006-02-15fix typo found in phobos's logsRoger Dingledine
svn:r6020
2006-02-13more log conversions.Roger Dingledine
whee. svn:r6003
2006-02-09Happy new year!Roger Dingledine
svn:r5949
2006-01-05Add reasons to DESTROY and RELAY_TRUNCATED cells.Nick Mathewson
svn:r5734