Peter Palfrader
28cac25d7e
r9749@danube: weasel | 2006-09-14 06:53:12 +0200
...
Do not graciously increase the size to be mmaped if the current size already is
at a page_size boundary. This is important since if a file has a size of zero
and we mmap() it with length > 0, then accessing the mmaped memory area causes
a bus error. However, if we pass a length of 0 to mmap() it will return with -1
and things work from there.
svn:r8387
2006-09-14 04:53:42 +00:00
Nick Mathewson
365ccf0742
r8725@Kushana: nickm | 2006-09-06 04:39:29 -0400
...
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 08:42:20 +00:00
Nick Mathewson
000b7b287c
r8724@Kushana: nickm | 2006-09-06 04:32:28 -0400
...
Fix spaces; restore support for mapping files over 4GB on win32 (?)
svn:r8326
2006-09-06 08:42:16 +00:00
Mike Chiussi
6ec9c1092a
- made configure check if we are building for win32
...
- 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-09-06 01:49:55 +00:00
Roger Dingledine
9f5856c03d
stop three memory leaks. nick, fix these if i'm wrong.
...
svn:r8235
2006-08-27 02:07:54 +00:00
Nick Mathewson
b050ecf86c
r7404@Kushana: nickm | 2006-08-16 09:32:19 -0400
...
Pass hints to getaddrinfo; fix bug 280 (?)
svn:r7069
2006-08-16 18:47:19 +00:00
Nick Mathewson
1b7ad5aed3
r7030@Kushana: nickm | 2006-08-04 14:46:52 -0700
...
Close an fd leak on failed mmap()
svn:r6988
2006-08-05 17:53:32 +00:00
Nick Mathewson
7c596c166b
r7029@Kushana: nickm | 2006-08-04 14:08:41 -0700
...
Remove now-spurious size and data arguments from tor_mmap_file
svn:r6987
2006-08-05 17:53:21 +00:00
Nick Mathewson
dbac3fb481
r7028@Kushana: nickm | 2006-08-04 13:10:16 -0700
...
Make data and size fields visible in tor_mmap_t; hide win magic differently.
svn:r6986
2006-08-05 17:53:08 +00:00
Nick Mathewson
db72fb9cdc
r7025@Kushana: nickm | 2006-08-04 12:03:22 -0700
...
Finish (I hope) windows mmap impl.
svn:r6981
2006-08-04 19:03:40 +00:00
Nick Mathewson
bf72878cad
r7012@Kushana: nickm | 2006-08-03 19:21:25 -0700
...
Add an "mmap handle" type to encapsulate bookkeeping elements of mmap issues; add prelim win32 impl
svn:r6980
2006-08-04 18:32:43 +00:00
Nick Mathewson
28a7c8a64c
Make compilation work on old MSVCs without GetVertsionEx magic. Patch from Frediano Ziglio.
...
svn:r6749
2006-07-09 22:29:12 +00:00
Nick Mathewson
1cd04abf1a
Actually enable mmap. That should improve matters.
...
svn:r6694
2006-06-28 08:54:32 +00:00
Roger Dingledine
45065f1466
simplify code now that libevent considers all sockets pollable.
...
what we really mean now is ">= 0", which is clearer to test for.
svn:r6543
2006-06-05 09:08:10 +00:00
Nick Mathewson
853e2d99b6
Add a new warning to our "warn a lot" list: unused parameters. This means we have to explicitly "use" unuseds, but it can catch bugs. (It caught two coding mistakes so far.)
...
svn:r6532
2006-06-04 22:42:13 +00:00
Nick Mathewson
c660a0f6a2
More DNS fixes. Send meaningful TTLs back to the client when
...
possible. Cache at the server side independently from the TTL, to
prevent attackers from probing the server to see who has been asking
for what hostnames. (Hi, Dan Kaminski!)
Also, clean some whitespace.
svn:r6526
2006-06-03 21:41:14 +00:00
Nick Mathewson
64d487a2d6
Add a basic mmap function, with a "fake-it" wrapper to do read_file_from_str instead. Based on code from Michael Mohr.
...
svn:r6510
2006-05-28 16:54:39 +00:00
Nick Mathewson
89a8411ace
Throw out this UNALIGNED_INT_ACCESS_OK nonsense. Even where it works, it is often way way slower than doing the right thing. Backport candidate.
...
svn:r6473
2006-05-23 08:23:03 +00:00
Roger Dingledine
7871ad9116
failing in a support function is a warn, not an err.
...
svn:r6239
2006-03-26 06:47:08 +00:00
Nick Mathewson
6d9632ba23
Check return value from GetVersionEx (even though the MSDN example doesnt) and zero out the LPOSVERSIONINFOEX struct before getting the version. This may fix the "johnboy" [major=-858993460,minor=-858993460] problem.
...
svn:r6233
2006-03-24 05:26:33 +00:00
Roger Dingledine
6ce36ead42
Start the process of converting warn to log_warn and so on.
...
This is needed because Windows already has an err() that we
can't clobber. And we need to be able to make the log functions
a macro so we can print the function's name in the log entry.
svn:r6000
2006-02-13 08:01:59 +00:00
Roger Dingledine
5f051574d5
Happy new year!
...
svn:r5949
2006-02-09 05:46:49 +00:00
Roger Dingledine
28f3765b5a
and maybe some function documentation will help too
...
svn:r5935
2006-02-09 02:59:37 +00:00
Roger Dingledine
f1864dfff3
On systems that don't have getrlimit (like windows), we were artificially
...
constraining ourselves to a max of 1024 connections. Now if there is no
getrlimit, just assume that we can handle the whole 15000 connections.
The better answer is to find a getrlimit equivalent on Windows, but hey,
one step at a time.
svn:r5854
2006-01-23 23:39:13 +00:00
Nick Mathewson
1af630d32c
Bite the bullet and limit all our source lines to 80 characters, the way IBM intended.
...
svn:r5582
2005-12-14 20:40:40 +00:00
Roger Dingledine
9b0a40ec78
crank the max line limit down to 150 chars.
...
svn:r5550
2005-12-10 08:27:01 +00:00
Nick Mathewson
9b432311c4
Make new logging stuff work on windows; fix a couple of windows typos.
...
svn:r5375
2005-11-15 03:05:23 +00:00
Nick Mathewson
932106f54c
Efficiency hack: call tor_fix_source_file late, not early. Add "BUG" domain. Domains are now bitmasks... just in case. Make some err msgs non-general.
...
svn:r5309
2005-10-25 07:05:03 +00:00
Nick Mathewson
a20835ac92
Check for even more windows version flags, and note any we do not recognize.
...
svn:r5297
2005-10-24 18:37:09 +00:00
Nick Mathewson
edf5698474
Start dividing log messages into logging domains. No, LD_ is not the best of identifiers. src/or has not been converted yet. Domains dont do anything yet.
...
svn:r5284
2005-10-18 21:58:19 +00:00
Nick Mathewson
010bcfa9df
Win32 compilation/correctness fixes.
...
svn:r5218
2005-10-07 19:33:47 +00:00
Nick Mathewson
ba24193ab5
Make doxygen marginally happier
...
svn:r5208
2005-10-06 04:33:40 +00:00
Nick Mathewson
92abf1b653
Make windows platform detection smarter. {Untested.}
...
svn:r5198
2005-10-05 22:04:45 +00:00
Nick Mathewson
92451f74a8
Reformat inconsistent function declarations.
...
svn:r5160
2005-09-30 01:09:52 +00:00
Nick Mathewson
5c53545d81
Add a bunch more warnings to out warning suite; resolve them; pack structs a little better.
...
svn:r5150
2005-09-29 22:59:17 +00:00
Nick Mathewson
6973ef9be4
Add a touch_file() function to compat so we can update cache mtimes.
...
svn:r5067
2005-09-14 23:27:52 +00:00
Nick Mathewson
922cee3d0c
Clean up a few warnings that make gcc twig out a bit.
...
svn:r5062
2005-09-14 20:59:25 +00:00
Roger Dingledine
fa507c63e8
put quotes around user-supplied strings so they are more likely to
...
realize if they add bad characters (like quotes) to the torrc
svn:r4844
2005-08-26 18:40:44 +00:00
Roger Dingledine
d5e426ab51
add a tor_dup_addr() function to simplify malloc()+tor_inet_ntoa()
...
svn:r4838
2005-08-26 07:37:07 +00:00
Nick Mathewson
9321db8c29
Fix bug with tor_memmem finding a match at the end of the string.
...
svn:r4803
2005-08-22 00:34:23 +00:00
Nick Mathewson
98f1265309
Fix compile failures on tor_gettimeofday() fix for windows
...
svn:r4685
2005-08-03 17:16:48 +00:00
Nick Mathewson
176e9055cc
Probably broken attempt to improve tor_gettimeofday granularity on windows.
...
svn:r4683
2005-08-03 16:28:39 +00:00
Nick Mathewson
18c11eb3bc
Be consistent about preferring foo* to struct foo*
...
svn:r4637
2005-07-22 21:12:10 +00:00
Nick Mathewson
97c58f066a
whitespace fixes
...
svn:r4544
2005-07-13 17:24:55 +00:00
Nick Mathewson
278bac421f
Fix windows compilation
...
svn:r4543
2005-07-13 15:24:33 +00:00
Nick Mathewson
d85bfe83bf
Make errors retrievable from tor_socketpair; resolve bug 163.
...
svn:r4509
2005-06-30 07:17:38 +00:00
Nick Mathewson
1647b6f837
Fix libc compilation
...
svn:r4497
2005-06-27 23:40:17 +00:00
Nick Mathewson
806da0d8b2
Compile on win32
...
svn:r4496
2005-06-27 23:35:04 +00:00
Roger Dingledine
09e87f452d
note a bug in our tor_socketpair implementation
...
can somebody fix this or create a flyspray entry for it?
svn:r4483
2005-06-26 05:03:21 +00:00
Roger Dingledine
8fdab20704
fix typo
...
svn:r4453
2005-06-18 02:23:11 +00:00