summaryrefslogtreecommitdiffstats
path: root/src/host/trxcon/trx_if.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/host/trxcon/trx_if.c')
-rw-r--r--src/host/trxcon/trx_if.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c
index 982fb40d..91b87a2a 100644
--- a/src/host/trxcon/trx_if.c
+++ b/src/host/trxcon/trx_if.c
@@ -660,7 +660,6 @@ int trx_if_open(struct trx_instance **trx, const char *local_host,
goto error;
/* Allocate a new dedicated state machine */
- osmo_fsm_register(&trx_fsm);
trx_new->fsm = osmo_fsm_inst_alloc(&trx_fsm, trx_new,
NULL, LOGL_DEBUG, "trx_interface");
@@ -710,3 +709,8 @@ void trx_if_close(struct trx_instance *trx)
osmo_fsm_inst_free(trx->fsm);
talloc_free(trx);
}
+
+static __attribute__((constructor)) void on_dso_load(void)
+{
+ OSMO_ASSERT(osmo_fsm_register(&trx_fsm) == 0);
+}