commit 78cbced45cd244c8aab84e6fb8087b852769f5bc Author: Nick Mathewson nickm@torproject.org Date: Fri Oct 20 09:59:48 2017 -0400
Rename "tell_event_loop_to_finish" to "...run_external_code"
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. --- src/or/connection_edge.c | 2 +- src/or/main.c | 4 ++-- src/or/main.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 77dac62b0..7d6667dbc 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -999,7 +999,7 @@ connection_ap_mark_as_pending_circuit_(entry_connection_t *entry_conn, * So the fix is to tell it right now that it ought to finish its loop at * its next available opportunity. */ - tell_event_loop_to_finish(); + tell_event_loop_to_run_external_code(); }
/** Mark <b>entry_conn</b> as no longer waiting for a circuit. */ diff --git a/src/or/main.c b/src/or/main.c index be6162834..e3a73ef03 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -639,7 +639,7 @@ connection_should_read_from_linked_conn(connection_t *conn) * runs out of events, now we've changed our mind: tell it we want it to * finish. */ void -tell_event_loop_to_finish(void) +tell_event_loop_to_run_external_code(void) { if (!called_loop_once) { struct timeval tv = { 0, 0 }; @@ -663,7 +663,7 @@ connection_start_reading_from_linked_conn(connection_t *conn) /* make sure that the event_base_loop() function exits at * the end of its run through the current connections, so we can * activate read events for linked connections. */ - tell_event_loop_to_finish(); + tell_event_loop_to_run_external_code(); } else { tor_assert(smartlist_contains(active_linked_connection_lst, conn)); } diff --git a/src/or/main.h b/src/or/main.h index 132ab12bb..808aa1414 100644 --- a/src/or/main.h +++ b/src/or/main.h @@ -45,7 +45,7 @@ int connection_is_writing(connection_t *conn); MOCK_DECL(void,connection_stop_writing,(connection_t *conn)); MOCK_DECL(void,connection_start_writing,(connection_t *conn));
-void tell_event_loop_to_finish(void); +void tell_event_loop_to_run_external_code(void);
void connection_stop_reading_from_linked_conn(connection_t *conn);