aboutsummaryrefslogtreecommitdiff
path: root/src/feature/nodelist/nodelist.c
diff options
context:
space:
mode:
authorTaylor Yu <catalyst@torproject.org>2018-08-28 13:30:58 -0500
committerTaylor Yu <catalyst@torproject.org>2018-09-10 13:18:32 -0500
commiteee62e13d97e3f07c0d8577f34729f4192738b44 (patch)
treef51df51cf47e9dcd9b73614f7da862caeb6e4763 /src/feature/nodelist/nodelist.c
parentb87a95289b63c891f4e12e0d40f41a39dae5aa7e (diff)
downloadtor-eee62e13d97e3f07c0d8577f34729f4192738b44.tar.gz
tor-eee62e13d97e3f07c0d8577f34729f4192738b44.zip
Make control_event_bootstrap() return void
Simplify control_event_bootstrap() by making it return void again. It is currently a fairly complicated function, and it's made more complicated by returning an int to signal whether it logged at NOTICE or INFO. The callers conditionally log messages at level NOTICE based on this return value. Change the callers to unconditionally log their verbose human-readable messages at level INFO to keep NOTICE logs less cluttered. This partially reverts the changes of #14950.
Diffstat (limited to 'src/feature/nodelist/nodelist.c')
-rw-r--r--src/feature/nodelist/nodelist.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/feature/nodelist/nodelist.c b/src/feature/nodelist/nodelist.c
index e62e87ea70..6dd501ea34 100644
--- a/src/feature/nodelist/nodelist.c
+++ b/src/feature/nodelist/nodelist.c
@@ -2553,10 +2553,9 @@ update_router_have_minimum_dir_info(void)
/* If paths have just become available in this update. */
if (res && !have_min_dir_info) {
control_event_client_status(LOG_NOTICE, "ENOUGH_DIR_INFO");
- if (control_event_bootstrap(BOOTSTRAP_STATUS_CONN_OR, 0) == 0) {
- log_notice(LD_DIR,
- "We now have enough directory information to build circuits.");
- }
+ control_event_bootstrap(BOOTSTRAP_STATUS_CONN_OR, 0);
+ log_info(LD_DIR,
+ "We now have enough directory information to build circuits.");
}
/* If paths have just become unavailable in this update. */