Nick Mathewson
df98582851
Merge remote-tracking branch 'github/ticket26626'
2018-07-03 12:52:43 -04:00
Nick Mathewson
d5a3bb960d
Retire U64_TO_DBL and DBL_TO_U64
...
These were necessary long ago to work around a bug in VC6.
2018-07-03 10:45:43 -04:00
Nick Mathewson
9568c0ce3d
Return U64_PRINTF_ARG and U64_FORMAT
...
The standard is printf("%"PRIu64, x);
2018-07-03 10:40:59 -04:00
Nick Mathewson
6c440da926
Remove system headers from or.h
2018-07-01 15:20:37 -04:00
Nick Mathewson
986d761510
Extract or_state_t to its own header.
...
Fewer modules needed this than I had expected.
2018-07-01 15:20:37 -04:00
Nick Mathewson
500826479a
Remove other needless includes include from or/*.h
2018-07-01 15:20:37 -04:00
Nick Mathewson
471104eaa5
Remove needless includes from or.h
...
or.h should really include only the minimum of stuff from or/*,
common/*, and lib/*.
2018-07-01 15:20:37 -04:00
Nick Mathewson
e0957022bd
Extract get_uname to lib/osinfo.
2018-06-29 12:21:52 -04:00
Nick Mathewson
0362cdc169
Move fd and memory-info functions.
2018-06-29 12:21:52 -04:00
Nick Mathewson
935ba02565
Fix paths for buffers.h; automated.
2018-06-28 16:29:35 -04:00
Nick Mathewson
d8b34e0886
Move buffers into container
...
Split the network-only and compression-only parts of buffers into
the appropriate modules.
2018-06-28 16:28:08 -04:00
Nick Mathewson
aa3edfd205
Move lockfile code into lib/fs
2018-06-28 11:33:50 -04:00
Nick Mathewson
315e6b59dd
Extract process-management functionality into a new lib/process
...
Note that procmon does *not* go here, since procmon needs to
integrate with the event loop.
2018-06-28 11:18:13 -04:00
Nick Mathewson
38fd3e0df0
Fix up the modules that include memarea.h (automated)
2018-06-28 09:25:58 -04:00
Nick Mathewson
55b7939367
Fix up include paths for sandbox.h (automated)
2018-06-27 10:04:41 -04:00
Nick Mathewson
accf239fa3
Rectify include paths (automated)
2018-06-21 13:19:00 -04:00
Nick Mathewson
b420da4cf8
Rectify include paths (automated)
2018-06-21 13:14:14 -04:00
Nick Mathewson
275aff6917
Rectify include paths (automated)
2018-06-21 10:47:11 -04:00
Nick Mathewson
a969ce464d
Remove log dependency from backtrace.[ch]
2018-06-20 16:16:45 -04:00
Nick Mathewson
9fa73003fc
Remove dmalloc support; closes #26426
...
Dmalloc hasn't seen a release in over a decade, and there are much
better tools to use these days.
2018-06-20 10:21:34 -04:00
Nick Mathewson
0dab29ce10
Run rectify_include_paths.py
2018-06-20 09:35:05 -04:00
Nick Mathewson
fb0019daf9
Update copyrights to 2018.
2018-06-20 08:13:28 -04:00
Nick Mathewson
fde868ffe3
Extract cell type and their queues into new headers
...
Since packed_cell and destroy_cell exist only to be queued, they go
in the same headers as the queues.
2018-06-15 15:27:46 -04:00
Nick Mathewson
ed0731c7de
Extract routerinfo_t into its own header.
...
I was expecting this to be much worse.
2018-06-15 14:49:46 -04:00
Nick Mathewson
50369f8981
Extract networkstatus_t and ..sr_info_t into their own headers
2018-06-15 13:45:15 -04:00
Nick Mathewson
8b7df72359
Split socks_request_t into its own header.
2018-06-15 13:01:50 -04:00
Nick Mathewson
19c34b4658
Move or_connection_t to its own header.
2018-06-15 10:48:50 -04:00
Nick Mathewson
5d5c442e6a
Split entry and edge_connection_t into their own headers.
2018-06-15 10:10:24 -04:00
Nick Mathewson
df9a3fe86f
Make server_port_cfg_t and port_cfg_t into separate headers.
2018-06-14 16:48:15 -04:00
Nick Mathewson
75e5b778e1
Merge remote-tracking branch 'public/bug25981'
2018-05-10 19:31:11 -04:00
Nick Mathewson
1eede00a4b
Merge branch 'ticket26063_squashed'
2018-05-10 09:13:28 -04:00
Nick Mathewson
beca6a585c
Merge branch 'ticket26064'
2018-05-10 09:05:15 -04:00
Nick Mathewson
e722bba263
Add a new function to enable/disable the per-second timer as needed
...
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.
2018-05-10 09:01:56 -04:00
Nick Mathewson
a4a7939ae1
Merge remote-tracking branch 'dgoulet/ticket26062_034_01'
2018-05-10 08:04:03 -04:00
Nick Mathewson
d972a8a944
Merge branch 'ticket26016'
2018-05-09 14:04:30 -04:00
Nick Mathewson
f684b48b5b
Merge branch 'ticket26009'
2018-05-09 14:01:08 -04:00
Nick Mathewson
0abf09b2ce
spelling fix
2018-05-09 14:01:00 -04:00
Nick Mathewson
15ce5a3e5a
Fix some clang warnings
2018-05-09 14:01:00 -04:00
Nick Mathewson
c9f07f36bf
Mark the 1-per-sec update_current_time() call as redundant.
...
We still do this time update here, since we do it from all
callbacks, but it is no longer a reason to keep the once-per-second
callback enabled.
Closes ticket 26009.
2018-05-09 14:01:00 -04:00
Nick Mathewson
285e7c98fd
Distinguish true clock jumps from idleness
...
Since we're going to be disabling the second-elapsed callback, we're
going to sometimes have long periods when no events file, and so the
current second is not updated. Handle that by having a better means
to detect "clock jumps" as opposed to "being idle for a while".
Tolerate far more of the latter.
Part of #26009 .
2018-05-09 14:01:00 -04:00
Nick Mathewson
a1a7ebfb8d
Give responsibility for waking up from DORMANT to a mainloop event
...
Closes ticket 26064.
2018-05-09 13:57:00 -04:00
David Goulet
01ffe8e2f4
config: Move any_client_port_set() to config.c
...
This functions is now used outside of networkstatus.c and makes more sense to
be in config.c.
It is also renamed to options_any_client_port_set() for the config.c
namespace.
No code behavior change.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-09 12:36:39 -04:00
Nick Mathewson
c0feb698a0
Comment-only fix: annotate we_are_hibernating() usage
...
Everywhere we use we_are_hibernating(), remind the reader what it
means.
(Also, add an XXXX to note a DisableNetwork usage to change later.)
2018-05-09 12:18:39 -04:00
Nick Mathewson
0c19ce7bde
Give control.c responsibility for its own once-a-second events
...
Now it has a function that can tell the rest of Tor whether any
once-a-second controller item should fire, and a function to fire
all the once-a-second events.
2018-05-09 12:06:52 -04:00
Nick Mathewson
8b1380cbd0
Don't crash when closing a connection before initializing libevent
...
Fixes bug 25981; bugfix on 96c5ac338a
. Bug not in any released
version of Tor.
2018-05-07 14:30:30 -04:00
Nick Mathewson
c3b7258370
Merge remote-tracking branch 'isis/bug24660_r1'
2018-05-03 13:50:18 -04:00
Nick Mathewson
48d8fe533e
Merge remote-tracking branch 'dgoulet/ticket25990_034_01'
2018-05-03 13:40:10 -04:00
Nick Mathewson
b0e5757710
Refactor to remove n_libevent_errors
...
We cleared this value in second_elapsed_callback. But what were we
using it for? For detecting if Libevent returned EINVAL too often!
We already have a way to detect too-frequent events, and that's with
a ratelim_t. Refactor the code to use that instead. Closes ticket
26016.
2018-05-03 12:44:00 -04:00
Nick Mathewson
83137275a7
Add update_current_time() calls to periodic and event-driven callbacks
...
This is part of 26009, where we're going to keep track of the
current time and its jumps without having to do so in
second_elapsed_callback.
2018-05-03 12:02:10 -04:00
Nick Mathewson
b0598f2a12
Move the "update the current second" code from second_elapsed_callback
...
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.
2018-05-03 12:02:10 -04:00