diff options
author | teor <teor@torproject.org> | 2019-09-04 15:40:57 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-09-06 16:58:53 +1000 |
commit | 612b0a41399d0ddf260f4f6dd989fcc97d069fbd (patch) | |
tree | 7448d370ed758874c323736d39e5e6d6eb601b98 /src/lib/wallclock/approx_time.c | |
parent | 896a1ac50b6ab182c1e15cc5271d0b24fcb90a31 (diff) | |
download | tor-612b0a41399d0ddf260f4f6dd989fcc97d069fbd.tar.gz tor-612b0a41399d0ddf260f4f6dd989fcc97d069fbd.zip |
subsys: Make the subsystem init order match the module dependencies
Fix levels for subsystems that depend on log/err
* winprocess (security) doesn't use err:
* call windows process security APIs as early as possible
* init err after winprocess
* move wallclock so it's still after err
* network and time depend on log:
* make sure that network and time can use logging.
* init network and time after log
Add comments explaining the module init order.
Fixes bug 31615; bugfix on 0.4.0.1-alpha.
Diffstat (limited to 'src/lib/wallclock/approx_time.c')
-rw-r--r-- | src/lib/wallclock/approx_time.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/wallclock/approx_time.c b/src/lib/wallclock/approx_time.c index 7b32804026..77eeddaf56 100644 --- a/src/lib/wallclock/approx_time.c +++ b/src/lib/wallclock/approx_time.c @@ -54,6 +54,8 @@ subsys_wallclock_initialize(void) const subsys_fns_t sys_wallclock = { .name = "wallclock", .supported = true, - .level = -99, + /* Approximate time is a diagnostic feature, we want it to init right after + * low-level error handling. */ + .level = -98, .initialize = subsys_wallclock_initialize, }; |