summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/fsm.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/fsm.c b/src/fsm.c
index 337786d9..04c583b0 100644
--- a/src/fsm.c
+++ b/src/fsm.c
@@ -256,6 +256,17 @@ int osmo_fsm_register(struct osmo_fsm *fsm)
return -EEXIST;
if (fsm->event_names == NULL)
LOGP(DLGLOBAL, LOGL_ERROR, "FSM '%s' has no event names! Please fix!\n", fsm->name);
+
+ if (fsm->allstate_action && !fsm->allstate_event_mask) {
+ LOGP(DLGLOBAL, LOGL_ERROR, "FSM '%s' has allstate_action but no allstate_event_mask\n",
+ fsm->name);
+ }
+
+ if (!fsm->allstate_action && fsm->allstate_event_mask) {
+ LOGP(DLGLOBAL, LOGL_ERROR, "FSM '%s' has allstate_event_mask but no allstate_action\n",
+ fsm->name);
+ }
+
llist_add_tail(&fsm->list, &osmo_g_fsms);
INIT_LLIST_HEAD(&fsm->instances);