summaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorTaylor Yu <catalyst@torproject.org>2018-12-16 16:05:58 -0600
committerTaylor Yu <catalyst@torproject.org>2018-12-20 18:46:17 -0600
commit271b50f54abac7af44e3e54589ff965d3cdac816 (patch)
treeaef158a07f39a869855b0920f6dcd1241601b68b /src/app
parent308dde0c386158971a66c6e035b3f1ad67019eb5 (diff)
downloadtor-271b50f54abac7af44e3e54589ff965d3cdac816.tar.gz
tor-271b50f54abac7af44e3e54589ff965d3cdac816.zip
Add ORCONN event pubsub system
Add a publish-subscribe subsystem to publish messages about changes to OR connections. connection_or_change_state() in connection_or.c and control_event_or_conn_event() in control.c publish messages to this subsystem via helper functions. Move state constants from connection_or.h to orconn_state.h so that subscribers don't have to include all of connection_or.h to take actions based on changes in OR connection state. Move event constants from control.h for similar reasons. Part of ticket 27167.
Diffstat (limited to 'src/app')
-rw-r--r--src/app/main/subsystem_list.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/app/main/subsystem_list.c b/src/app/main/subsystem_list.c
index 8640329e92..1858738096 100644
--- a/src/app/main/subsystem_list.c
+++ b/src/app/main/subsystem_list.c
@@ -8,6 +8,7 @@
#include "lib/cc/compat_compiler.h"
#include "lib/cc/torint.h"
+#include "core/or/orconn_event_sys.h"
#include "lib/compress/compress_sys.h"
#include "lib/crypt_ops/crypto_sys.h"
#include "lib/err/torerr_sys.h"
@@ -35,6 +36,7 @@ const subsys_fns_t *tor_subsystems[] = {
&sys_compress, /* -70 */
&sys_crypto, /* -60 */
&sys_tortls, /* -50 */
+ &sys_orconn_event, /* -40 */
};
const unsigned n_tor_subsystems = ARRAY_LENGTH(tor_subsystems);