Commit Graph

9691 Commits

Author SHA1 Message Date
Nick Mathewson 52e36feda1 Call evthread_use_windows_threads when running with IOCP on windows 2011-08-17 14:44:16 -04:00
Nick Mathewson d2cd67c83f Use evbuffer_copyout() in inspect_evbuffer(). 2011-08-17 13:09:05 -04:00
Nick Mathewson 06be6105e4 Merge remote-tracking branch 'origin/maint-0.2.2'
Conflicts:
	src/or/config.c
2011-08-17 12:00:44 -04:00
Nick Mathewson d79d648edc Don't write ControlPorts to disk till after we setuid and make datadir
Fix for bug 3747; bugfix on 0.2.2.26-beta.
2011-08-17 11:22:16 -04:00
Nick Mathewson 14552a12b3 Merge branch 'bug3743' 2011-08-17 10:46:28 -04:00
Nick Mathewson 6650dc932a Remove a needless config_find_option 2011-08-17 10:46:22 -04:00
Sebastian Hahn 6a06f45b04 Actually pick a random port when "auto" is specified
ddc65e2b33 had broken this
2011-08-17 10:41:36 -04:00
Kamran Riaz Khan e6e804848c Don't compare LINELIST_S and OBSOLETE config options. 2011-08-16 06:28:38 +05:00
George Kadianakis db4cde3810 Improve the code a tad.
* Use strcmpstart() instead of strcmp(x,y,strlen(y)).
* Warn the user if the managed proxy failed to launch.
* Improve function documentation.
* Use smartlist_len() instead of n_unconfigured_proxies.
* Split managed_proxy_destroy() to managed_proxy_destroy()
  and managed_proxy_destroy_with_transports().
* Constification.
2011-08-15 17:26:03 +02:00
Nick Mathewson 2dc40b9c49 Merge remote-tracking branch 'asn/bug3728' 2011-08-15 11:06:50 -04:00
Nick Mathewson aeb27526f8 Merge remote-tracking branch 'origin/maint-0.2.2' 2011-08-15 10:54:55 -04:00
Robert Ransom 03f6ee8c5f Remove extra quotation marks around the result of esc_for_log 2011-08-15 10:54:19 -04:00
Nick Mathewson 0ddc8de0b6 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.)
2011-08-15 10:52:23 -04:00
George Kadianakis ec8d0a6d83 Free global_rate_limit in connection_free_all(). 2011-08-13 20:37:13 +02:00
George Kadianakis a5fd07d178 Move connection_free_all() to the bottom of connection.c to enjoy maximum visibility. 2011-08-13 20:29:22 +02:00
George Kadianakis ea3e9416c6 Spawn multiple protocols using a single managed proxy.
If multiple torrc transport lines have the same argv, tor instructs a
single managed proxy to launch multiple protocols.
2011-08-12 21:33:05 +02:00
Sebastian Hahn f137ae896e 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.
2011-08-11 20:37:51 +02:00
Nick Mathewson 5da9f722f2 Whitespace tweaks 2011-08-10 15:06:45 -04:00
Nick Mathewson 5252c9434f Fix a const warning in bug1692 code 2011-08-10 15:06:11 -04:00
Nick Mathewson b76f46c6d8 Merge branch 'bug1692-squashed' 2011-08-10 15:04:36 -04:00
Kamran Riaz Khan 02a735dfa8 Fix condition reported by nickm. 2011-08-10 15:03:25 -04:00
Kamran Riaz Khan 73f07c558b Return if CONF_CHANGED isn't interesting. 2011-08-10 15:03:25 -04:00
Kamran Riaz Khan 643913de75 Escape configuration values before sending them via CONF_CHANGED. 2011-08-10 15:03:24 -04:00
Kamran Riaz Khan 86f68ed695 Use smartlist_asprintf_add() to improve readability. 2011-08-10 15:03:24 -04:00
Robert Ransom e42a74e563 Add smartlist_[v]asprintf_add
I should have added this before implementing #2411.
2011-08-10 15:03:24 -04:00
Nick Mathewson 333df6006d 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.
2011-08-09 14:52:22 -04:00
Sebastian Hahn 7c340a97b1 Sticking a size_t into long generates a warn on win 2011-08-09 11:34:21 +02:00
Sebastian Hahn bed79c47f4 Get rid of an unused parameter warning on win 2011-08-09 11:03:17 +02:00
Sebastian Hahn 0a5338e03c Sockets are unsigned on windows
this gets rid of a warning about signed/unsigned comparison
2011-08-09 11:03:16 +02:00
Kamran Riaz Khan 5f624805e7 Minor code readability fix. 2011-08-09 03:17:21 +05:00
Nick Mathewson 10d9bcb2a2 Merge remote-tracking branch 'origin/maint-0.2.2' 2011-08-08 17:21:39 -04:00
Nick Mathewson f570470830 Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2 2011-08-08 17:21:21 -04:00
Kamran Riaz Khan 23ef12462a Minor comment fix. 2011-08-08 19:58:43 +05:00
Karsten Loesing c75ee94ab4 Update to the August 2011 GeoIP database. 2011-08-08 16:57:01 +02:00
Kamran Riaz Khan 02c62b2966 Refactor to do CONF_CHANGED event formatting inside control.c 2011-08-08 19:19:06 +05:00
Nick Mathewson a72b1815e8 Merge remote-tracking branch 'public/bug3550' 2011-08-08 10:05:41 -04:00
Robert Ransom cb24a06a3e Remove connection_edge_streams_are_compatible
It's dead code (not used anywhere by the current proposal 171 algorithm).
2011-08-08 09:43:16 -04:00
Robert Ransom cab3641638 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.
2011-08-08 09:42:48 -04:00
Kamran Riaz Khan 5a801a8c8b Emits CONF_CHANGED events whenever Tor's configuration values change. 2011-08-08 04:38:53 +05:00
George Kadianakis 941709ee50 Server transport proxies should bind on the same port each time, if possible. 2011-08-07 18:05:40 +02:00
Robert Ransom 52421e9101 Fix log message typo 2011-08-06 00:25:07 -07:00
Nick Mathewson ce87887461 Merge remote-tracking branch 'public/bug3683' 2011-08-05 20:21:27 -04:00
Nick Mathewson 413574ad38 Clear socks auth fields before free 2011-08-05 19:07:33 -04:00
Nick Mathewson e511a3a4dd Handle storing much longer socks4 authentication data. 2011-08-05 18:56:30 -04:00
Karsten Loesing d690a99dfe 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.
2011-08-04 21:18:19 +02:00
Karsten Loesing 88083463cb 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.
2011-08-04 21:18:19 +02:00
Karsten Loesing 2174fc0ba0 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.
2011-08-04 21:18:19 +02:00
Karsten Loesing abeaabba00 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.
2011-08-04 21:18:19 +02:00
Karsten Loesing 3d3ed853e7 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.
2011-08-04 21:18:18 +02:00
Karsten Loesing 07dc46e7fc 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.
2011-08-04 21:18:18 +02:00