fsm: explicitly log removal from parent fsm

Since removing an FSM from its parent twice causes a segfault, it is very
interesting to see when that is attempted.

Removing could be made more robust, but logging is interesting for
investigating why an FSM is being removed twice in the first place (currently
the case in openbsc's vlr_lu_fsm).

Change-Id: Idec6b7aa5344f1e903c9d2aa2a3640cab0d70fb0
This commit is contained in:
Neels Hofmeyr 2016-12-15 02:26:03 +01:00
parent 5c5c78aacd
commit 2ae5f18692
1 changed files with 3 additions and 0 deletions

View File

@ -442,6 +442,9 @@ void _osmo_fsm_inst_term(struct osmo_fsm_inst *fi,
}
/* delete ourselves from the parent */
if (parent)
LOGPFSMSRC(fi, file, line, "Removing from parent %s\n",
osmo_fsm_inst_name(parent));
llist_del(&fi->proc.child);
/* call destructor / clean-up function */