]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
14 years agoDocument limitation of log_from_handle with partial reads
Steven Murdoch [Tue, 30 Aug 2011 14:02:28 +0000 (15:02 +0100)] 
Document limitation of log_from_handle with partial reads

14 years agoFactor out and re-write code for splitting lines from a handle
Steven Murdoch [Tue, 30 Aug 2011 13:55:51 +0000 (14:55 +0100)] 
Factor out and re-write code for splitting lines from a handle

Now handles non-printable characters and will not output a spurious
new-line if given a partial line.

14 years agoRefactor out command line formatting
Steven Murdoch [Mon, 29 Aug 2011 11:26:55 +0000 (12:26 +0100)] 
Refactor out command line formatting

Now correctly handles whitespace, quotes and backslashes. Passes all unit tests.

14 years agoAdd a sanity check
Steven Murdoch [Sun, 28 Aug 2011 23:36:41 +0000 (00:36 +0100)] 
Add a sanity check

14 years agoReplace two magic tristates with #define'd names
Steven Murdoch [Sun, 28 Aug 2011 23:30:18 +0000 (00:30 +0100)] 
Replace two magic tristates with #define'd names

- process_handle_t.status
- return value of tor_get_exit_code()

14 years agoMake signature of tor_spawn_background more conventional
Steven Murdoch [Sun, 28 Aug 2011 22:35:02 +0000 (23:35 +0100)] 
Make signature of tor_spawn_background more conventional

Conventionally in Tor, structs are returned as pointers, so change
tor_spawn_background() to return the process handle in a pointer rather
than as return value.

14 years agoAppease "make check-spaces"
Steven Murdoch [Wed, 24 Aug 2011 20:34:13 +0000 (21:34 +0100)] 
Appease "make check-spaces"

14 years agoImprove comments and fix one bug
Steven Murdoch [Wed, 24 Aug 2011 20:33:53 +0000 (21:33 +0100)] 
Improve comments and fix one bug

14 years agoWe don't need to find our own path, just tell Windows to search
Steven Murdoch [Wed, 24 Aug 2011 19:50:58 +0000 (20:50 +0100)] 
We don't need to find our own path, just tell Windows to search

14 years agoFind test-child.exe by looking in same directory as test.exe
Steven Murdoch [Wed, 24 Aug 2011 18:56:38 +0000 (19:56 +0100)] 
Find test-child.exe by looking in same directory as test.exe

14 years agoFix compilation errors under *nix
Steven Murdoch [Tue, 23 Aug 2011 00:09:24 +0000 (01:09 +0100)] 
Fix compilation errors under *nix

14 years agoFix test cases to handle MSYS style paths (/c/foo rather than c:/foo)
Steven Murdoch [Mon, 22 Aug 2011 19:05:11 +0000 (20:05 +0100)] 
Fix test cases to handle MSYS style paths (/c/foo rather than c:/foo)

Also fix test case to expect 1 on successfully spawning a subprocess

14 years agoTidy up subprocess code
Steven Murdoch [Mon, 22 Aug 2011 18:43:38 +0000 (19:43 +0100)] 
Tidy up subprocess code

- Better error handling
- Write description of functions
- Don't assume non-negative process return values

14 years agoFix some compiler warnings
Steven Murdoch [Mon, 22 Aug 2011 17:13:58 +0000 (18:13 +0100)] 
Fix some compiler warnings

14 years agoRevert change to libminiupnpc search path
Steven Murdoch [Mon, 22 Aug 2011 16:55:40 +0000 (17:55 +0100)] 
Revert change to libminiupnpc search path

This was supposed to fix an oddity with library searching in autoconf
but it didn't actually fix anything.

14 years agoMerge branch 'bug1983-port-tor-fw-helper-to-windows' into bug2046
Steven Murdoch [Mon, 22 Aug 2011 16:53:17 +0000 (17:53 +0100)] 
Merge branch 'bug1983-port-tor-fw-helper-to-windows' into bug2046

Conflicts:
configure.in
src/tools/tor-fw-helper/Makefile.am
src/tools/tor-fw-helper/tor-fw-helper-upnp.c
src/tools/tor-fw-helper/tor-fw-helper.c

14 years agoCorrect reference to libiphlpapi from libiphlapi
Steven Murdoch [Mon, 22 Aug 2011 16:38:22 +0000 (17:38 +0100)] 
Correct reference to libiphlpapi from libiphlapi

14 years agoAppease "make check spaces"
Steven Murdoch [Mon, 22 Aug 2011 15:31:30 +0000 (16:31 +0100)] 
Appease "make check spaces"

14 years agoOnly link ws2_32 and iphlapi on windows.
Nick Mathewson [Fri, 19 Aug 2011 17:20:15 +0000 (13:20 -0400)] 
Only link ws2_32 and iphlapi on windows.

This is a tweak for the tor-fw-helper port to windows.

14 years agoLink and build tor-fw-helper on Windows
Steven Murdoch [Fri, 19 Aug 2011 13:47:44 +0000 (14:47 +0100)] 
Link and build tor-fw-helper on Windows

- Update configure script to test for libminiupnpc along with the
  libws2_32 and libiphlpapi libraries required by libminiupnpc
- When building tor-fw-helper, link in libiphlpapi
- Link in libminiupnpc statically becasue I could not get the DLL
  to link properly
- Call WSAStartup before doing network operations
- Fix up a compiler warning about uninitialized backend_state

N.B. The changes to configure.in and Makefile.am will break on non-
Windows platforms.

14 years agoRemove warning about a loop parsing evbuffer socks
Nick Mathewson [Thu, 18 Aug 2011 20:15:03 +0000 (16:15 -0400)] 
Remove warning about a loop parsing evbuffer socks

This behavior is normal when we want more data than the evbuffer
actually has for us.  We'll ask for (say) 7 bytes, get only 5
(because that's all there is), try to parse the 5 bytes, and get
told "no, I want 7".  One option would be to bail out early whenever
want_length is > buflen, but sometimes we use an over-large
want_length.  So instead, let's just remove the warning here: it's
not a bug after all.

14 years agoAppease "make check-spaces"
Nick Mathewson [Thu, 18 Aug 2011 19:17:37 +0000 (15:17 -0400)] 
Appease "make check-spaces"

14 years agoAutomatically use filtering bufferevents with IOCP.
Nick Mathewson [Thu, 18 Aug 2011 19:08:49 +0000 (15:08 -0400)] 
Automatically use filtering bufferevents with IOCP.

14 years agoMerge remote branch 'origin/master' into bug2046
Steven Murdoch [Thu, 18 Aug 2011 17:42:02 +0000 (18:42 +0100)] 
Merge remote branch 'origin/master' into bug2046

14 years agoComplete logging of output from port forwarding helper
Steven Murdoch [Thu, 18 Aug 2011 17:41:23 +0000 (18:41 +0100)] 
Complete logging of output from port forwarding helper

14 years agoCall evthread_use_windows_threads when running with IOCP on windows
Nick Mathewson [Wed, 17 Aug 2011 18:44:16 +0000 (14:44 -0400)] 
Call evthread_use_windows_threads when running with IOCP on windows

14 years agoUse evbuffer_copyout() in inspect_evbuffer().
Nick Mathewson [Wed, 17 Aug 2011 17:07:43 +0000 (13:07 -0400)] 
Use evbuffer_copyout() in inspect_evbuffer().

14 years agoBufferevents now requires Libevent 2.0.13-stable.
Nick Mathewson [Wed, 17 Aug 2011 16:53:50 +0000 (12:53 -0400)] 
Bufferevents now requires Libevent 2.0.13-stable.

(Earlier Libevent versions have bufferevent bugs that affect us, and
are missing some APIs that it would be handy to use.)

14 years agoMerge remote-tracking branch 'origin/maint-0.2.2'
Nick Mathewson [Wed, 17 Aug 2011 16:00:44 +0000 (12:00 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.2'

Conflicts:
src/or/config.c

14 years agoDon't write ControlPorts to disk till after we setuid and make datadir
Nick Mathewson [Wed, 17 Aug 2011 15:22:16 +0000 (11:22 -0400)] 
Don't write ControlPorts to disk till after we setuid and make datadir

Fix for bug 3747; bugfix on 0.2.2.26-beta.

14 years agoMerge branch 'bug3743'
Nick Mathewson [Wed, 17 Aug 2011 14:46:28 +0000 (10:46 -0400)] 
Merge branch 'bug3743'

14 years agoRemove a needless config_find_option
Nick Mathewson [Wed, 17 Aug 2011 14:46:22 +0000 (10:46 -0400)] 
Remove a needless config_find_option

14 years agoActually pick a random port when "auto" is specified
Sebastian Hahn [Mon, 15 Aug 2011 23:38:15 +0000 (01:38 +0200)] 
Actually pick a random port when "auto" is specified

ddc65e2b3303559ab7b842a176ee6c2eda9e4027 had broken this

14 years agoDon't compare LINELIST_S and OBSOLETE config options.
Kamran Riaz Khan [Tue, 16 Aug 2011 01:28:38 +0000 (06:28 +0500)] 
Don't compare LINELIST_S and OBSOLETE config options.

14 years agoMerge remote-tracking branch 'asn/bug3728'
Nick Mathewson [Mon, 15 Aug 2011 15:06:50 +0000 (11:06 -0400)] 
Merge remote-tracking branch 'asn/bug3728'

14 years agoMerge remote-tracking branch 'origin/maint-0.2.2'
Nick Mathewson [Mon, 15 Aug 2011 14:54:55 +0000 (10:54 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.2'

14 years agoRemove extra quotation marks around the result of esc_for_log
Robert Ransom [Mon, 15 Aug 2011 11:53:11 +0000 (04:53 -0700)] 
Remove extra quotation marks around the result of esc_for_log

14 years agoOops; _actually_ enable microdesc-by-default for clients
Nick Mathewson [Mon, 15 Aug 2011 14:52:23 +0000 (10:52 -0400)] 
Oops; _actually_ enable microdesc-by-default for clients

It turns out that it wasn't enough to set the configuration to
"auto", since the correct behavior for "auto" had been disabled in
microdesc.c.   :p

(Hasn't been in a release yet, so doesn't need a changes entry.)

14 years agoFree global_rate_limit in connection_free_all().
George Kadianakis [Sat, 13 Aug 2011 18:37:13 +0000 (20:37 +0200)] 
Free global_rate_limit in connection_free_all().

14 years agoMove connection_free_all() to the bottom of connection.c to enjoy maximum visibility.
George Kadianakis [Sat, 13 Aug 2011 18:29:22 +0000 (20:29 +0200)] 
Move connection_free_all() to the bottom of connection.c to enjoy maximum visibility.

14 years agoMerge remote-tracking branch 'sebastian/bug3700'
Nick Mathewson [Thu, 11 Aug 2011 18:42:15 +0000 (14:42 -0400)] 
Merge remote-tracking branch 'sebastian/bug3700'

14 years agoDon't warn on http connection to my orport
Sebastian Hahn [Thu, 11 Aug 2011 18:37:51 +0000 (20:37 +0200)] 
Don't warn on http connection to my orport

Also remove a few other related warnings that could occur during the ssl
handshake. We do this because the relay operator can't do anything about
them, and they aren't their fault.

14 years agoMerge remote-tracking branch 'origin/maint-0.2.2'
Nick Mathewson [Thu, 11 Aug 2011 15:53:03 +0000 (11:53 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.2'

14 years agoMerge branch 'bug3643'
Sebastian Hahn [Thu, 11 Aug 2011 05:56:38 +0000 (07:56 +0200)] 
Merge branch 'bug3643'

14 years agoIgnore deprecation warnings on OS X
Sebastian Hahn [Wed, 10 Aug 2011 17:22:41 +0000 (19:22 +0200)] 
Ignore deprecation warnings on OS X

Starting with Lion, Apple decided to deprecate the system openssl. We
can start requiring users to install their own openssl once OS X doesn't
ship with it anymore.

14 years agoWhitespace tweaks
Nick Mathewson [Wed, 10 Aug 2011 19:06:45 +0000 (15:06 -0400)] 
Whitespace tweaks

14 years agoFix a const warning in bug1692 code
Nick Mathewson [Wed, 10 Aug 2011 19:06:11 +0000 (15:06 -0400)] 
Fix a const warning in bug1692 code

14 years agoMerge branch 'bug1692-squashed'
Nick Mathewson [Wed, 10 Aug 2011 19:04:36 +0000 (15:04 -0400)] 
Merge branch 'bug1692-squashed'

14 years agoFix condition reported by nickm.
Kamran Riaz Khan [Tue, 9 Aug 2011 17:21:04 +0000 (22:21 +0500)] 
Fix condition reported by nickm.

14 years agoReturn if CONF_CHANGED isn't interesting.
Kamran Riaz Khan [Tue, 9 Aug 2011 10:28:17 +0000 (15:28 +0500)] 
Return if CONF_CHANGED isn't interesting.

14 years agoEscape configuration values before sending them via CONF_CHANGED.
Kamran Riaz Khan [Tue, 9 Aug 2011 10:25:16 +0000 (15:25 +0500)] 
Escape configuration values before sending them via CONF_CHANGED.

14 years agoUse smartlist_asprintf_add() to improve readability.
Kamran Riaz Khan [Tue, 9 Aug 2011 10:18:57 +0000 (15:18 +0500)] 
Use smartlist_asprintf_add() to improve readability.

14 years agoAdd smartlist_[v]asprintf_add
Robert Ransom [Wed, 3 Aug 2011 22:49:39 +0000 (15:49 -0700)] 
Add smartlist_[v]asprintf_add

I should have added this before implementing #2411.

14 years agoMake FooPort 0 correctly disable the FooPort.
Nick Mathewson [Tue, 9 Aug 2011 18:52:22 +0000 (14:52 -0400)] 
Make FooPort 0 correctly disable the FooPort.

Since the prop171 stuff, it had instead made Tor bind port 0, and
re-bind it differently all the time.

Resolves bug3704; not in any released version.

14 years agoSticking a size_t into long generates a warn on win
Sebastian Hahn [Tue, 9 Aug 2011 09:34:21 +0000 (11:34 +0200)] 
Sticking a size_t into long generates a warn on win

14 years agoGet rid of an unused parameter warning on win
Sebastian Hahn [Tue, 9 Aug 2011 09:00:25 +0000 (11:00 +0200)] 
Get rid of an unused parameter warning on win

14 years agoSockets are unsigned on windows
Sebastian Hahn [Tue, 9 Aug 2011 08:59:03 +0000 (10:59 +0200)] 
Sockets are unsigned on windows

this gets rid of a warning about signed/unsigned comparison

14 years agoMinor code readability fix.
Kamran Riaz Khan [Mon, 8 Aug 2011 22:17:21 +0000 (03:17 +0500)] 
Minor code readability fix.

14 years agoAdd changes file.
Kamran Riaz Khan [Mon, 8 Aug 2011 22:02:40 +0000 (03:02 +0500)] 
Add changes file.

14 years agoMerge remote-tracking branch 'origin/maint-0.2.2'
Nick Mathewson [Mon, 8 Aug 2011 21:21:39 +0000 (17:21 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.2'

14 years agoMerge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2
Nick Mathewson [Mon, 8 Aug 2011 21:21:21 +0000 (17:21 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2

14 years agoMinor comment fix.
Kamran Riaz Khan [Mon, 8 Aug 2011 14:58:43 +0000 (19:58 +0500)] 
Minor comment fix.

14 years agoUpdate to the August 2011 GeoIP database.
Karsten Loesing [Mon, 8 Aug 2011 14:57:01 +0000 (16:57 +0200)] 
Update to the August 2011 GeoIP database.

14 years agoRefactor to do CONF_CHANGED event formatting inside control.c
Kamran Riaz Khan [Mon, 8 Aug 2011 14:19:06 +0000 (19:19 +0500)] 
Refactor to do CONF_CHANGED event formatting inside control.c

14 years agoMerge remote-tracking branch 'public/bug3550'
Nick Mathewson [Mon, 8 Aug 2011 14:05:41 +0000 (10:05 -0400)] 
Merge remote-tracking branch 'public/bug3550'

14 years agoRemove connection_edge_streams_are_compatible
Robert Ransom [Sat, 6 Aug 2011 20:44:28 +0000 (13:44 -0700)] 
Remove connection_edge_streams_are_compatible

It's dead code (not used anywhere by the current proposal 171 algorithm).

14 years agoFix handling of ISO_STREAM
Robert Ransom [Sat, 6 Aug 2011 20:42:32 +0000 (13:42 -0700)] 
Fix handling of ISO_STREAM

Now we track *which* stream with ISO_STREAM set is associated to a
particular circuit, so that we won't think that stream is incompatible
with its circuit and launch another one a second later, and we use that
same field to mark circuits which have had an ISO_STREAM stream attached
to them, so that we won't ever put a second stream on that circuit.

Fixes bug 3695.

14 years agoEmits CONF_CHANGED events whenever Tor's configuration values change.
Kamran Riaz Khan [Sun, 7 Aug 2011 23:38:53 +0000 (04:38 +0500)] 
Emits CONF_CHANGED events whenever Tor's configuration values change.

14 years agoFix log message typo
Robert Ransom [Sat, 6 Aug 2011 07:25:07 +0000 (00:25 -0700)] 
Fix log message typo

14 years agoMerge remote-tracking branch 'public/bug3683'
Nick Mathewson [Sat, 6 Aug 2011 00:21:27 +0000 (20:21 -0400)] 
Merge remote-tracking branch 'public/bug3683'

14 years agoClear socks auth fields before free
Nick Mathewson [Fri, 5 Aug 2011 23:07:33 +0000 (19:07 -0400)] 
Clear socks auth fields before free

14 years agoHandle storing much longer socks4 authentication data.
Nick Mathewson [Fri, 5 Aug 2011 22:56:30 +0000 (18:56 -0400)] 
Handle storing much longer socks4 authentication data.

14 years agoClean up bridge-stats code.
Karsten Loesing [Thu, 4 Aug 2011 12:45:24 +0000 (14:45 +0200)] 
Clean up bridge-stats code.

Only write a bridge-stats string if bridge stats have been
initialized.  This behavior is similar to dirreq-stats, entry-stats,
etc.

Also add a few unit tests for the bridge-stats code.

14 years agoSeparate generation of an entry-stats string from writing it to disk.
Karsten Loesing [Thu, 4 Aug 2011 12:14:01 +0000 (14:14 +0200)] 
Separate generation of an entry-stats string from writing it to disk.

This commit is similar to the previous two commits for dirreq-stats,
but for entry-stats.

14 years agoSeparate generation of a dirreq-stats string from writing it to disk.
Karsten Loesing [Thu, 4 Aug 2011 10:28:12 +0000 (12:28 +0200)] 
Separate generation of a dirreq-stats string from writing it to disk.

This patch separates the generation of a dirreq-stats string from
actually writing it to disk.  The new geoip_format_dirreq_stats()
generates a dirreq-stats string that geoip_dirreq_stats_write() writes
to disk.  All the state changing (e.g., resetting the dirreq-stats
history and initializing the next measurement interval) takes place in
geoip_dirreq_stats_write().  That allows us to finally test the
dirreq-stats code better.

14 years agoClean up geoip_dirreq_stats_write().
Karsten Loesing [Thu, 4 Aug 2011 09:52:52 +0000 (11:52 +0200)] 
Clean up geoip_dirreq_stats_write().

We later want to split this function into one function that generates
the dirreq-stats string and one that writes it to disk.

14 years agoAdd unit tests for buffer-stats.
Karsten Loesing [Wed, 3 Aug 2011 11:29:03 +0000 (13:29 +0200)] 
Add unit tests for buffer-stats.

Now that formatting the buffer-stats string is separate from writing
it to disk, we can also decouple the logic to extract stats from
circuits and finally write some unit tests for the history code.

14 years agoSeparate generation of a buffer-stats string from writing it to disk.
Karsten Loesing [Wed, 3 Aug 2011 11:26:49 +0000 (13:26 +0200)] 
Separate generation of a buffer-stats string from writing it to disk.

The new rep_hist_format_buffer_stats() generates a buffer-stats string
that rep_hist_buffer_stats_write() writes to disk.  All the state
changing (e.g., resetting the buffer-stats history and initializing
the next measurement interval) takes place in
rep_hist_buffer_stats_write().  That allows us to finally test the
buffer-stats code better.

14 years agoClean up rep_hist_buffer_stats_write().
Karsten Loesing [Wed, 3 Aug 2011 11:34:29 +0000 (13:34 +0200)] 
Clean up rep_hist_buffer_stats_write().

We later want to split this function into one function that generates
the buffer-stats string and one that writes it to disk.

14 years agoCreate cell-stats history even if we didn't see a single circuit.
Karsten Loesing [Wed, 3 Aug 2011 11:33:48 +0000 (13:33 +0200)] 
Create cell-stats history even if we didn't see a single circuit.

So far, if we didn't see a single circuit, we refrained from
generating a cell-stats string and logged a warning.  Nobody will
notice the warning, and people will wonder why there's no cell-stats
string in the extra-info descriptor.  The better behavior is to
generate a cell-stats string with all zeros.

14 years agoReplace files in stats/ rather than appending to them.
Karsten Loesing [Thu, 4 Aug 2011 18:53:53 +0000 (20:53 +0200)] 
Replace files in stats/ rather than appending to them.

Right now, we append statistics to files in the stats/ directory for
half of the statistics, whereas we overwrite these files for the other
half. In particular, we append buffer, dirreq, and entry stats and
overwrite exit, connection, and bridge stats.

Appending to files was useful when we didn't include stats in extra-info
descriptors, because otherwise we'd have to copy them away to prevent
Tor from overwriting them.

But now that we include statistics in extra-info descriptors, it makes
no sense to keep the old statistics forever. We should change the
behavior to overwriting instead of appending for all statistics.

Implements #2930.

14 years agoMake --quiet and --hush apply to default logs, not only initial logs
Nick Mathewson [Thu, 4 Aug 2011 18:23:51 +0000 (14:23 -0400)] 
Make --quiet and --hush apply to default logs, not only initial logs

Fixes bug 3550; bugfix on 0.2.0.10-alpha (where --quiet was introduced).

14 years agoTreat socks_request->{username,password} as non-NUL-terminated
Nick Mathewson [Thu, 4 Aug 2011 16:03:31 +0000 (12:03 -0400)] 
Treat socks_request->{username,password} as non-NUL-terminated

They *are* non-NUL-terminated, after all (and they have to be, since
the SOCKS5 spec allows them to contain embedded NULs.  But the code
to implement proposal 171 was copying them with tor_strdup and
comparing them with strcmp_opt.

Fix for bug on 3683; bug not present in any yet-released version.

14 years agoImplement protocol-type isolation correctly.
Nick Mathewson [Tue, 2 Aug 2011 14:48:39 +0000 (10:48 -0400)] 
Implement protocol-type isolation correctly.

Previously we'd just looked at the connection type, but that's
always CONN_TYPE_AP.  Instead, we should be looking at the type of
the listener that created the connection.

Spotted by rransom; fixes bug 3636.

14 years agoput the 0.2.1.30 stanza in the master changelog too
Roger Dingledine [Mon, 1 Aug 2011 20:14:17 +0000 (16:14 -0400)] 
put the 0.2.1.30 stanza in the master changelog too

14 years agoreach back in time and correct two changelog entries
Roger Dingledine [Mon, 1 Aug 2011 19:53:13 +0000 (15:53 -0400)] 
reach back in time and correct two changelog entries

14 years agoInitial patch to build Tor with msvc and nmake
Nick Mathewson [Mon, 1 Aug 2011 16:36:59 +0000 (12:36 -0400)] 
Initial patch to build Tor with msvc and nmake

We'll still need to tweak it so that it looks for includes and
libraries somewhere more sensible than "where we happened to find
them on Erinn's system"; so that tests and tools get built too;
so that it's a bit documented; and so that we actually try running
the output.

Work done with Erinn Clark.

14 years agoRe-order tor_fw_helper_LDADD flags so that they work
Nick Mathewson [Mon, 1 Aug 2011 15:05:49 +0000 (11:05 -0400)] 
Re-order tor_fw_helper_LDADD flags so that they work

Patch from "blueness".

14 years agoTest case for reading the partial output of a background process
Steven Murdoch [Sun, 24 Jul 2011 22:31:59 +0000 (23:31 +0100)] 
Test case for reading the partial output of a background process

14 years agoFix compilation on non-Windows platforms
Steven Murdoch [Sat, 23 Jul 2011 13:32:39 +0000 (14:32 +0100)] 
Fix compilation on non-Windows platforms

14 years agoIf hProcess is NULL, read_all_handle returns if it would block
Steven Murdoch [Sat, 23 Jul 2011 20:35:50 +0000 (21:35 +0100)] 
If hProcess is NULL, read_all_handle returns if it would block

14 years agoUse PeekNamedPipe to avoid blocking ReadFile when there is nothing to read
Steven Murdoch [Fri, 22 Jul 2011 20:12:00 +0000 (21:12 +0100)] 
Use PeekNamedPipe to avoid blocking ReadFile when there is nothing to read

14 years agoAdd code to read all from a handle, but this block forever
Steven Murdoch [Fri, 22 Jul 2011 14:57:56 +0000 (15:57 +0100)] 
Add code to read all from a handle, but this block forever

See http://stackoverflow.com/questions/3722409/windows-child-process-with-redirected-input-and-output
for a potential solution

14 years agoAdd Windows version of tor_spawn_background and ancillary functions
Steven Murdoch [Thu, 21 Jul 2011 18:26:19 +0000 (19:26 +0100)] 
Add Windows version of tor_spawn_background and ancillary functions

14 years agoGeneralize process spawning so its test compiles (but fails) in Windows
Steven Murdoch [Thu, 21 Jul 2011 15:34:48 +0000 (16:34 +0100)] 
Generalize process spawning so its test compiles (but fails) in Windows

- pid, stdout/stderr_pipe now encapsulated in process_handle
- read_all replaced by tor_read_all_from_process_stdin/stderr
- waitpid replaced by tor_get_exit_code

Untested on *nix

14 years agoImprove log messages for optimistic data retry
Ian Goldberg [Thu, 21 Jul 2011 13:49:00 +0000 (09:49 -0400)] 
Improve log messages for optimistic data retry

14 years agoUnder Windows, call WSAStartup before using the network
Steven Murdoch [Thu, 21 Jul 2011 13:14:57 +0000 (14:14 +0100)] 
Under Windows, call WSAStartup before using the network

14 years agoXXX Link in libiphlpapi (should be disabled on non Win32 platforms)
Steven Murdoch [Thu, 21 Jul 2011 12:47:58 +0000 (13:47 +0100)] 
XXX Link in libiphlpapi (should be disabled on non Win32 platforms)

14 years agoXXX Use static linking on Windows because miniupnpc doesn't work as DLL
Steven Murdoch [Thu, 21 Jul 2011 12:47:16 +0000 (13:47 +0100)] 
XXX Use static linking on Windows because miniupnpc doesn't work as DLL

14 years agoAdd src/test/test{-child}.exe to gitignore. bug3626
Nick Mathewson [Thu, 21 Jul 2011 12:40:25 +0000 (08:40 -0400)] 
Add src/test/test{-child}.exe to gitignore. bug3626