Age | Commit message (Collapse) | Author |
|
This commit won't build yet -- it just puts everything in a slightly
more logical place.
The reasoning here is that "src/core" will hold the stuff that every (or
nearly every) tor instance will need in order to do onion routing.
Other features (including some necessary ones) will live in
"src/feature". The "src/app" directory will hold the stuff needed
to have Tor be an application you can actually run.
This commit DOES NOT refactor the former contents of src/or into a
logical set of acyclic libraries, or change any code at all. That
will have to come in the future.
We will continue to move things around and split them in the future,
but I hope this lays a reasonable groundwork for doing so.
|
|
or.h should really include only the minimum of stuff from or/*,
common/*, and lib/*.
|
|
|
|
|
|
|
|
We're about to use this to turn off the per-second timer when the
network is disabled and there aren't any per-second controller
events enabled.
|
|
This now happens in a new function, with the intent of having it
invoked from our callbacks. This is one step on the way to 26009.
|
|
|
|
Closes ticket 25948.
|
|
When we change the hibernation state, rescan the main loop event list because
the new state might affect the events.
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
Bug not in any released Tor.
|
|
Implements ticket 25932.
|
|
|
|
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
In case we transitionned to a new role in Tor, we need to launch and/or
destroy some periodic events.
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
Previously this was done as part of the refill callback, but there's
no real reason to do it like that. Since we're trying to remove the
refill callback completely, we can do this work as part of
record_num_bytes_transferred_impl(), which already does quite a lot
of this.
|
|
|
|
|
|
(This function is no longer used.)
|
|
This is a simple search-and-replace to rename the token bucket type
to indicate that it contains both a read and a write bucket, bundled
with their configuration. It's preliminary to refactoring the
bucket type.
|
|
|
|
Using get_uptime() and reset_uptime() instead of
accessing stats_n_seconds_working directly.
stats_n_seconds_working is not extern anymore.
Ticket #25081
|
|
|
|
|
|
|
|
This patch adds support for MainloopStats that allow developers to get
main event loop statistics via Tor's heartbeat status messages. The new
status log message will show how many succesful, erroneous, and idle
event loop iterations we have had.
See: https://bugs.torproject.org/24605
|
|
|
|
Adding tor_remove_file(filename) and refactoring tor_cleanup().
Removing CookieAuthFile and ExtORPortCookieAuthFile when tor_cleanup() is
called.
Fixes #23271.
Signed-off-by: Fernando Fernandez Mancera <ffernandezmancera@gmail.com>
|
|
|
|
The main effect of this change is to commit to an extensible
long-term API.
Closes ticket 23684.
|
|
Instead of calling tor_cleanup(), exit(x), we can now call
tor_shutdown_event_loop_and_exit.
|
|
This function was never about 'finishing' the event loop, but rather
about making sure that the code outside the event loop would be run
at least once.
|
|
|
|
This fixes a warning from jenkins.
|
|
|
|
|
|
no actual changes
|
|
|
|
|
|
|
|
This is a big-ish patch, but it's very straightforward. Under this
clang warning, we're not actually allowed to have a global variable
without a previous extern declaration for it. The cases where we
violated this rule fall into three roughly equal groups:
* Stuff that should have been static.
* Stuff that was global but where the extern was local to some
other C file.
* Stuff that was only global when built for the unit tests, that
needed a conditional extern in the headers.
The first two were IMO genuine problems; the last is a wart of how
we build tests.
|
|
|
|
no actual behavior changes
|
|
|
|
'public/decouple_signals'
|
|
Instead of having it call update_all_descriptor_downloads and
update_networkstatus_downloads directly, we can have it cause them to
get rescheduled and called from run_scheduled_events.
Closes ticket 16789.
|
|
This needs debugging; it currently breaks the stem tests.
|
|
|
|
like might happen for Tails or Whonix users who start with a very wrong
hardware clock, use Tor to discover a more accurate time, and then
fix their clock.
Resolves part of ticket 8766.
(There are still some timers in various places that aren't addressed yet.)
|
|
|