jolly has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34792?usp=email )
(
1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: ASCI: Register state machines only once, when the application starts ......................................................................
ASCI: Register state machines only once, when the application starts
Related: OS#5364 Change-Id: I46d68e31e0bfd6a64c190e439f45b24502dd1f30 --- M src/host/layer23/src/mobile/gsm44068_gcc_bcc.c 1 file changed, 16 insertions(+), 6 deletions(-)
Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve
diff --git a/src/host/layer23/src/mobile/gsm44068_gcc_bcc.c b/src/host/layer23/src/mobile/gsm44068_gcc_bcc.c index 7bb8b29..0cef1c3 100644 --- a/src/host/layer23/src/mobile/gsm44068_gcc_bcc.c +++ b/src/host/layer23/src/mobile/gsm44068_gcc_bcc.c @@ -83,14 +83,8 @@ * init */
-static struct osmo_fsm vgcs_gcc_fsm; -static struct osmo_fsm vgcs_bcc_fsm; - int gsm44068_gcc_init(struct osmocom_ms *ms) { - OSMO_ASSERT(osmo_fsm_register(&vgcs_gcc_fsm) == 0); - OSMO_ASSERT(osmo_fsm_register(&vgcs_bcc_fsm) == 0); - LOGP(DGCC, LOGL_INFO, "init GCC/BCC\n");
return 0; @@ -1484,6 +1478,12 @@ .timer_cb = vgcs_gcc_fsm_timer_cb, };
+static __attribute__((constructor)) void on_dso_load(void) +{ + OSMO_ASSERT(osmo_fsm_register(&vgcs_gcc_fsm) == 0); + OSMO_ASSERT(osmo_fsm_register(&vgcs_bcc_fsm) == 0); +} + static const char *gsm44068_gcc_state_name(struct osmo_fsm_inst *fi) { return vgcs_gcc_fsm_states[fi->state].name;