]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
14 years agoAdd a missing include to util.c to get waitpid() on Linux
Nick Mathewson [Wed, 31 Aug 2011 04:36:43 +0000 (00:36 -0400)] 
Add a missing include to util.c to get waitpid() on Linux

14 years agoRename tor_join_cmdline to tor_join_win_cmdline; tweak doxygen
Nick Mathewson [Tue, 30 Aug 2011 20:00:08 +0000 (16:00 -0400)] 
Rename tor_join_cmdline to tor_join_win_cmdline; tweak doxygen

14 years agoMerge remote-tracking branch 'sjmurdoch/bug2046'
Nick Mathewson [Tue, 30 Aug 2011 19:51:45 +0000 (15:51 -0400)] 
Merge remote-tracking branch 'sjmurdoch/bug2046'

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 agoAdd a bufferevent note to startup log
Sebastian Hahn [Mon, 29 Aug 2011 21:10:03 +0000 (23:10 +0200)] 
Add a bufferevent note to startup log

This should help us easily spot if a tor was built with
--enable-bufferevent or not

14 years agoFix compilation on non-bufferevent systems after 3803 fix: oops.
Nick Mathewson [Mon, 29 Aug 2011 17:41:59 +0000 (13:41 -0400)] 
Fix compilation on non-bufferevent systems after 3803 fix: oops.

14 years agoSplit out rephist parts of buckets_decrement
Nick Mathewson [Mon, 29 Aug 2011 16:55:59 +0000 (12:55 -0400)] 
Split out rephist parts of buckets_decrement

For bufferevents, we had all of connection_buckets_decrement() stubbed
out.  But that's not actually right!  The rephist_* parts were
essential for, inter alia, recording our own bandwidth.  This patch
splits out the rephist parts of connection_buckets_decrement() into their
own function, and makes the bufferevent code call that new function.

Fixes bug 3803, and probably 3824 and 3826 too.  Bugfix on 0.2.3.1-alpha.

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 another heuristic for making release notes
Roger Dingledine [Mon, 29 Aug 2011 01:43:19 +0000 (21:43 -0400)] 
add another heuristic for making release notes

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 agoupdate punctuation now that we've seen the source text
Roger Dingledine [Sat, 27 Aug 2011 19:05:58 +0000 (15:05 -0400)] 
update punctuation now that we've seen the source text

14 years agoClarify the heartbeat message a bit.
George Kadianakis [Sat, 27 Aug 2011 16:45:54 +0000 (18:45 +0200)] 
Clarify the heartbeat message a bit.

14 years agoupdate changelog/release notes from release-0.2.2
Roger Dingledine [Fri, 26 Aug 2011 23:14:07 +0000 (19:14 -0400)] 
update changelog/release notes from release-0.2.2

14 years agoGather all 0.2.2 changelogs into unified release notes
Roger Dingledine [Fri, 26 Aug 2011 06:42:18 +0000 (02:42 -0400)] 
Gather all 0.2.2 changelogs into unified release notes

14 years agoMerge branch 'bug3814'
Nick Mathewson [Fri, 26 Aug 2011 20:42:13 +0000 (16:42 -0400)] 
Merge branch 'bug3814'

14 years agoFix a bufferevent-related bug that killed tunneled dirserv conns
Nick Mathewson [Fri, 26 Aug 2011 20:10:17 +0000 (16:10 -0400)] 
Fix a bufferevent-related bug that killed tunneled dirserv conns

Because tunneled connections are implemented with buffervent_pair,
writing to them can cause an immediate flush.  This means that
added to them and then checking to see whether their outbuf is
empty is _not_ an adequate way to see whether you added anything.
This caused a problem in directory server connections, since they
would try spooling a little more data out, and then close the
connection if there was no queued data to send.

This fix should improve matters; it only closes the connection if
there is no more data to spool, and all of the spooling callbacks
are supposed to put the dirconn into dir_spool_none on completion.

This is bug 3814; Sebastian found it; bugfix on 0.2.3.1-alpha.

14 years agoMerge remote-tracking branch 'origin/maint-0.2.2'
Nick Mathewson [Thu, 25 Aug 2011 22:55:28 +0000 (18:55 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.2'

14 years agoMention that HiddenServiceDir must exist
Sebastian Hahn [Thu, 25 Aug 2011 20:26:54 +0000 (22:26 +0200)] 
Mention that HiddenServiceDir must exist

14 years agomanually forward-port 2871dd8bef
Roger Dingledine [Thu, 25 Aug 2011 19:51:24 +0000 (15:51 -0400)] 
manually forward-port 2871dd8bef

14 years agoMerge branch 'bufev_ratelim_and_wm'
Nick Mathewson [Wed, 24 Aug 2011 21:57:55 +0000 (17:57 -0400)] 
Merge branch 'bufev_ratelim_and_wm'

14 years agoSet write low-watermarks on all bufferevents.
Nick Mathewson [Wed, 24 Aug 2011 21:30:20 +0000 (17:30 -0400)] 
Set write low-watermarks on all bufferevents.

If we don't do this, then we never invoke the bufferevent write
callbacks until all the bufferevent's data is flushed.

14 years agoAdd write watermarks to filtered bufferevents.
Nick Mathewson [Wed, 24 Aug 2011 21:18:25 +0000 (17:18 -0400)] 
Add write watermarks to filtered bufferevents.

14 years agoApply rate-limiting to the lowest bufferevent in the stack.
Nick Mathewson [Wed, 24 Aug 2011 21:09:56 +0000 (17:09 -0400)] 
Apply rate-limiting to the lowest bufferevent in the stack.

When we're doing filtering ssl bufferevents, we want the rate-limits
to apply to the lowest level of the bufferevent stack, so that we're
actually limiting bytes sent on the network. Otherwise, we'll read
from the network aggressively, and only limit stuff as we process it.

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 agoMerge remote-tracking branch 'origin/maint-0.2.2'
Nick Mathewson [Wed, 24 Aug 2011 17:53:17 +0000 (13:53 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.2'

14 years agolround() missing in MSVC
Gisle Vanem [Wed, 24 Aug 2011 17:52:44 +0000 (13:52 -0400)] 
lround() missing in MSVC

lround() is missing in MS Visual-C's <math.h>. Not available anywhere.
Here is an easy patch.

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 agoDisable run-time changes to DisableIOCP: They do not work
Nick Mathewson [Fri, 19 Aug 2011 21:07:54 +0000 (17:07 -0400)] 
Disable run-time changes to DisableIOCP: They do not work

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.