aboutsummaryrefslogtreecommitdiff
path: root/src/feature/control/control_events.c
diff options
context:
space:
mode:
authorNeel Chauhan <neel@neelc.org>2020-07-08 20:12:56 -0700
committerNeel Chauhan <neel@neelc.org>2020-07-08 20:22:02 -0700
commit60f699c859875b92602819c47c4a673343bee5fb (patch)
tree4617246e48abf697a3e23a7c821a50fa60484935 /src/feature/control/control_events.c
parente4bfa734a60555a1871a008c2a125fe55d564aa1 (diff)
downloadtor-60f699c859875b92602819c47c4a673343bee5fb.tar.gz
tor-60f699c859875b92602819c47c4a673343bee5fb.zip
Send a control port event when a stream enters the AP_CONN_STATE_CONTROLLER_WAIT state
Diffstat (limited to 'src/feature/control/control_events.c')
-rw-r--r--src/feature/control/control_events.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/feature/control/control_events.c b/src/feature/control/control_events.c
index 8e69c772f6..85936aa722 100644
--- a/src/feature/control/control_events.c
+++ b/src/feature/control/control_events.c
@@ -109,6 +109,7 @@ const struct control_event_t control_event_table[] = {
{ EVENT_HS_DESC, "HS_DESC" },
{ EVENT_HS_DESC_CONTENT, "HS_DESC_CONTENT" },
{ EVENT_NETWORK_LIVENESS, "NETWORK_LIVENESS" },
+ { EVENT_CONTROLLER_WAIT, "CONTROLLER_WAIT" },
{ 0, NULL },
};
@@ -2363,6 +2364,15 @@ control_events_free_all(void)
disable_log_messages = 0;
}
+/** Our own router descriptor has changed; tell any controllers that care.
+ */
+int
+control_event_enter_controller_wait(void)
+{
+ send_control_event(EVENT_CONTROLLER_WAIT, "650 CONTROLLER_WAIT\r\n");
+ return 0;
+}
+
#ifdef TOR_UNIT_TESTS
/* For testing: change the value of global_event_mask */
void