diff options
Diffstat (limited to 'src/osmo-bsc/a_reset.c')
-rw-r--r-- | src/osmo-bsc/a_reset.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/osmo-bsc/a_reset.c b/src/osmo-bsc/a_reset.c index bc4191456..3f512781b 100644 --- a/src/osmo-bsc/a_reset.c +++ b/src/osmo-bsc/a_reset.c @@ -149,10 +149,6 @@ void a_reset_alloc(struct bsc_msc_data *msc, const char *name, void *cb) /* There must not be any double allocation! */ OSMO_ASSERT(msc->a.reset_fsm == NULL); - /* Register the fsm description (if not already done) */ - if (osmo_fsm_find_by_name(fsm.name) != &fsm) - OSMO_ASSERT(osmo_fsm_register(&fsm) == 0); - /* Allocate and configure a new fsm instance */ reset_ctx = talloc_zero(msc, struct reset_ctx); OSMO_ASSERT(reset_ctx); @@ -217,3 +213,8 @@ bool a_reset_conn_ready(struct bsc_msc_data *msc) return false; } + +static __attribute__((constructor)) void a_reset_fsm_init() +{ + OSMO_ASSERT(osmo_fsm_register(&fsm) == 0); +} |