This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Vadim Yanitskiy gerrit-no-reply at lists.osmocom.orgVadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/12783 )
Change subject: common/sap_fsm.c: register SAP FSM on DSO load
......................................................................
common/sap_fsm.c: register SAP FSM on DSO load
Change-Id: Id539c2a3477526b816918070bab93b26c900998a
---
M src/host/layer23/src/common/sap_fsm.c
1 file changed, 5 insertions(+), 4 deletions(-)
Approvals:
Jenkins Builder: Verified
Harald Welte: Looks good to me, approved
diff --git a/src/host/layer23/src/common/sap_fsm.c b/src/host/layer23/src/common/sap_fsm.c
index 9591dab..f07488f 100644
--- a/src/host/layer23/src/common/sap_fsm.c
+++ b/src/host/layer23/src/common/sap_fsm.c
@@ -674,10 +674,6 @@
sap = &ms->sap_entity;
OSMO_ASSERT(sap->fi == NULL);
- /* Register our FSM (if required) */
- if (!osmo_fsm_find_by_name(sap_fsm_def.name))
- OSMO_ASSERT(osmo_fsm_register(&sap_fsm_def) == 0);
-
/* Allocate an instance using ms as talloc context */
sap->fi = osmo_fsm_inst_alloc(&sap_fsm_def, ms,
ms, LOGL_DEBUG, ms->name);
@@ -688,3 +684,8 @@
return 0;
}
+
+static __attribute__((constructor)) void on_dso_load(void)
+{
+ OSMO_ASSERT(osmo_fsm_register(&sap_fsm_def) == 0);
+}
--
To view, visit https://gerrit.osmocom.org/12783
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id539c2a3477526b816918070bab93b26c900998a
Gerrit-Change-Number: 12783
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190203/ef184f0b/attachment.htm>