aboutsummaryrefslogtreecommitdiff
path: root/src/feature/control/btrack.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/feature/control/btrack.c')
-rw-r--r--src/feature/control/btrack.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/feature/control/btrack.c b/src/feature/control/btrack.c
index d3d12cb2b7..3ce97dc855 100644
--- a/src/feature/control/btrack.c
+++ b/src/feature/control/btrack.c
@@ -24,6 +24,7 @@
#include "feature/control/btrack_circuit.h"
#include "feature/control/btrack_orconn.h"
#include "feature/control/btrack_sys.h"
+#include "lib/pubsub/pubsub.h"
#include "lib/subsys/subsys.h"
static int
@@ -31,8 +32,6 @@ btrack_init(void)
{
if (btrack_orconn_init())
return -1;
- if (btrack_circ_init())
- return -1;
return 0;
}
@@ -44,10 +43,22 @@ btrack_fini(void)
btrack_circ_fini();
}
+static int
+btrack_add_pubsub(pubsub_connector_t *connector)
+{
+ if (btrack_orconn_add_pubsub(connector))
+ return -1;
+ if (btrack_circ_add_pubsub(connector))
+ return -1;
+
+ return 0;
+}
+
const subsys_fns_t sys_btrack = {
.name = "btrack",
.supported = true,
.level = -30,
.initialize = btrack_init,
.shutdown = btrack_fini,
+ .add_pubsub = btrack_add_pubsub,
};