diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-02-14 09:34:51 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-02-24 07:49:39 -0500 |
commit | 63b7dabdea6c25cba6604af5d9340799636985b3 (patch) | |
tree | fe84c023f3a5474fbffd6e9005621632f4772499 /src/core/or/or_sys.c | |
parent | 2e5d555c0e4adb5ea4739ec58124f61c46bd20aa (diff) | |
download | tor-63b7dabdea6c25cba6604af5d9340799636985b3.tar.gz tor-63b7dabdea6c25cba6604af5d9340799636985b3.zip |
Merge ocirc and orconn events into or subsystem.
Pubsub events are not supposed to have their own subsystems; they're
supposed to be part of a parent subsystem.
Diffstat (limited to 'src/core/or/or_sys.c')
-rw-r--r-- | src/core/or/or_sys.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/or/or_sys.c b/src/core/or/or_sys.c index 394b7945e1..126f5448cf 100644 --- a/src/core/or/or_sys.c +++ b/src/core/or/or_sys.c @@ -34,10 +34,22 @@ subsys_or_shutdown(void) policies_free_all(); } +static int +subsys_or_add_pubsub(struct pubsub_connector_t *connector) +{ + int rv = 0; + if (orconn_add_pubsub(connector) < 0) + rv = -1; + if (ocirc_add_pubsub(connector) < 0) + rv = -1; + return rv; +} + const struct subsys_fns_t sys_or = { .name = "or", .supported = true, .level = 20, .initialize = subsys_or_initialize, .shutdown = subsys_or_shutdown, + .add_pubsub = subsys_or_add_pubsub, }; |