Commit Graph

535 Commits

Author SHA1 Message Date
Nick Mathewson
d37f4dd8a9 But on windows, localtime and gmtime _are_ threadsafe.
svn:r3654
2005-02-22 07:09:17 +00:00
Nick Mathewson
70c3580f81 Patch to localtime/gmtime handling: use the _r variants where available. Use mutexes to fake _r where necessary. Make mutexes no-ops where no threading is enabled.
svn:r3653
2005-02-22 07:03:03 +00:00
Nick Mathewson
d01718841e Remove assumptions that maximum path length is anything like 1024. From comments by Chris Palmer
svn:r3652
2005-02-22 06:38:39 +00:00
Nick Mathewson
bb53a0bddd remove spurious semicolons
svn:r3650
2005-02-22 04:55:19 +00:00
Nick Mathewson
d060f845f2 Snarf some logic from python, adapted to our own needs, to handle gethostbyname_r correctly across platforms.
svn:r3649
2005-02-22 04:50:31 +00:00
Nick Mathewson
a68fcbf807 Initial IRIX compatibility fixes: check for inttypes.h; check for platform cell_t.
svn:r3648
2005-02-22 04:26:45 +00:00
Nick Mathewson
6bd81c9ee2 Fix windows build: do not spuriously include openssl where not needed; handle lack of gethostbyname_r properly.
svn:r3644
2005-02-22 02:51:55 +00:00
Roger Dingledine
b5bddd8cfd bugfix: actually use the argument to strmap_free()
svn:r3640
2005-02-20 23:12:20 +00:00
Roger Dingledine
596d65ec3b avoid case (not yet triggered) where smartlists could grow out
of control


svn:r3636
2005-02-19 03:02:33 +00:00
Nick Mathewson
aac97a3c6a Tell openssl how to use locks and how to find thread ids -- this may prevent race conditions surrounding the error queue.
svn:r3622
2005-02-13 22:32:25 +00:00
Nick Mathewson
f6221b695f Apply windows patch from Dmitri Bely
svn:r3617
2005-02-12 21:03:37 +00:00
Nick Mathewson
5d836c8140 Free tls resources on exit too
svn:r3615
2005-02-11 01:41:19 +00:00
Nick Mathewson
915202048e Handle return value from getaddrinfo properly
svn:r3526
2005-02-03 23:13:36 +00:00
Nick Mathewson
a035032f09 Use getaddrinfo and gethostbyname_r where available. Note that these are not necessarily threadsafe: this needs more thinking. Perhaps we should back down on this multithreading idea.
svn:r3522
2005-02-03 21:31:04 +00:00
Nick Mathewson
e4b21c97f7 Forward-port SGI Compatibility patches from Jan Schaumann
svn:r3517
2005-02-03 19:59:10 +00:00
Roger Dingledine
051cda803e point out a potential thread/process leak problem when we're out of memory
svn:r3512
2005-02-03 07:35:24 +00:00
Peter Palfrader
ddd724ef94 Add --with-dmalloc configure option
svn:r3508
2005-02-03 07:25:10 +00:00
Roger Dingledine
f3b74a2adb http://www.erlenstar.demon.co.uk/unix/faq_2.html says we
should call _exit, not exit, from child processes.


svn:r3506
2005-02-03 06:40:06 +00:00
Roger Dingledine
c53c7a0b4c clarify what smartlist_remove promises, since we rely on it.
svn:r3473
2005-01-31 00:24:59 +00:00
Nick Mathewson
083b67cda5 Add rudimentary pthread support that needs more testing.
svn:r3439
2005-01-27 22:34:48 +00:00
Nick Mathewson
fbb7f869c5 fwd-port win32 isprint fix
svn:r3410
2005-01-22 00:42:58 +00:00
Roger Dingledine
2a908e5180 forward-port: fix win32 compile
svn:r3406
2005-01-22 00:35:09 +00:00
Roger Dingledine
a2e441da06 give a header file for ntohs
svn:r3388
2005-01-20 20:15:14 +00:00
Nick Mathewson
29b6637a62 Compilation fixes for win32 version detection.
svn:r3385
2005-01-20 19:03:09 +00:00
Nick Mathewson
432e313c81 Make zlib detection happy on little-endian platforms; fix unit tests.
svn:r3384
2005-01-20 19:02:35 +00:00
Nick Mathewson
f8c14bbf1f Detect windows platform correctly
svn:r3377
2005-01-19 23:10:16 +00:00
Nick Mathewson
2c803bff9a Make detect_compression_method work on platforms with more evil chars.
svn:r3376
2005-01-19 23:07:43 +00:00
Nick Mathewson
69fa5be7b6 Workaround for webservers that lie about Content-Encoding: Tor now tries to autodetect compressed directories and compression itself. (resolves bug 65)
svn:r3374
2005-01-19 22:40:33 +00:00
Nick Mathewson
324b192f68 Make Tor use Niels Provos's libevent instead of it's current
poll-but-sometimes-select mess.  This will let us use faster async cores
(like epoll, kpoll, and /dev/poll), and hopefully work better on Windows
too.

There are some fairly nasty changes to main.c here; this will almost
certainly break something.  But hey, that's what alphas are for.


svn:r3341
2005-01-12 06:42:32 +00:00
Roger Dingledine
51f47d746e clean up smartlist_string_isin so callers don't have to manage bufs
themselves


svn:r3338
2005-01-12 04:53:53 +00:00
Roger Dingledine
74bc4e5af0 help avoid overflow from len_in + (len_in/n)*len_ins
nick, do you think this does it? if so, we should maybe backport too.


svn:r3334
2005-01-10 16:30:51 +00:00
Roger Dingledine
1f3e77bf92 make the initial temp log only notice-err, not info-err
svn:r3274
2005-01-04 02:25:18 +00:00
Roger Dingledine
9e6d6c6096 Bugfix: we've been using openssl's BIO_get_mem_data incorrectly.
We assumed the pem-encoded data written by PEM_write_bio_RSAPrivateKey
is nul-terminated, and at least sometimes, it's not.


svn:r3263
2005-01-03 22:35:40 +00:00
Nick Mathewson
b50263f740 More work on task #43: fix race conditions on multithreaded (win32) servers.
svn:r3251
2005-01-03 19:07:25 +00:00
Nick Mathewson
ead52e0bdc Possible fix for task #43: when running on a multithreaded environment (currently only windows), threads should not close opposite sides of their socketpairs, and workers should not call connection_free_all(). This may fix win32 servers.
svn:r3247
2005-01-03 18:06:51 +00:00
Nick Mathewson
fca7ba9777 Resolve task 42: find where 19-char nicknames were getting truncated when read from certs, and fix it. Also audit use of MAX_NICKNAME_LEN; no other badness found, but some docs/code cleaned up a touch.
svn:r3244
2005-01-03 17:53:20 +00:00
Roger Dingledine
c3189c2573 fix an assert on startup when the disk is full and you're logging to a file
svn:r3204
2004-12-22 08:16:42 +00:00
Roger Dingledine
cf17d0d29c move network_init from or/main to common/compat
call network_init in tor-resolve.c too
move tor_lookup_hostname from common/util to common/compat


svn:r3203
2004-12-22 05:29:06 +00:00
Nick Mathewson
c79c4200f4 Fix a bug in last patch; and keep my name out of the assert() call too.
svn:r3200
2004-12-22 02:46:28 +00:00
Nick Mathewson
32978afa54 Workaround for brain-damaged __FILE__ handling on MSVC: keep Nick's name out
of the warning messages.


svn:r3199
2004-12-22 02:32:26 +00:00
Nick Mathewson
bbc10c2ea1 Make split(..., NULL) split on horizontal space; fix bug with tabs in config file.
svn:r3155
2004-12-16 21:10:51 +00:00
Nick Mathewson
8c85c0bef8 Note that length checking on base64_decode is kinda conservative
svn:r3144
2004-12-13 18:38:19 +00:00
Nick Mathewson
fd4c624677 Belt *or* suspenders will be sufficient when casting things to unsigned char.
svn:r3122
2004-12-08 07:20:21 +00:00
Nick Mathewson
fe6eb34a10 Solaris CC freaks out if isspace and friends get anything other than an int. We learned that, so we casted. But it is also a bad idea to cast a signed char to an int and expect things to work on win32. Now we cast to unsigned char, then to int, then pass to isspace. Ug
svn:r3120
2004-12-08 00:42:50 +00:00
Roger Dingledine
bd5524bfc7 fix comment
svn:r3110
2004-12-07 15:37:35 +00:00
Nick Mathewson
a6aa5eebd6 Fix some memory leaks and unlikely segfaults
svn:r3103
2004-12-07 07:48:16 +00:00
Roger Dingledine
2297c57ba5 note an improvement on our uname we might want to make one day
svn:r3101
2004-12-07 07:35:32 +00:00
Nick Mathewson
0f49fd3bcd Fix leakable rsa key
svn:r3099
2004-12-07 06:48:02 +00:00
Nick Mathewson
249a36586f Fix parse_iso_time on platforms without strptime.
svn:r3091
2004-12-06 22:39:10 +00:00
Roger Dingledine
50a314c931 int is not necessarily the same size as size_t
svn:r3079
2004-12-05 11:58:30 +00:00