aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-02-09 09:58:57 +0000
committerHarald Welte <laforge@gnumonks.org>2018-02-09 10:01:31 +0000
commit6590044337c1497393dd779f45c0b584f8027e3e (patch)
treeddbd4822b6185dc18baf118bbec6bbb0d187301c
parent4e4521b3d5b6f554d7d653697c856b70fb49cf03 (diff)
Revert "fsm: do not terminate child FSMs early"
This reverts commit 5ec91980ac2224aa1e9bf070a0e382d0d8c2b729. More or less like I expected, it creates fall-out. osmo-msc master builds are failing, as are the open build service builds. The patch has therefor *not* been sufficiently tested. Change-Id: I8d961d7bbd91b6a8d7691f24cb67720c3d001c7e
-rw-r--r--src/fsm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/fsm.c b/src/fsm.c
index dd3538f..d8751c9 100644
--- a/src/fsm.c
+++ b/src/fsm.c
@@ -509,6 +509,9 @@ void _osmo_fsm_inst_term(struct osmo_fsm_inst *fi,
LOGPFSMSRC(fi, file, line, "Terminating (cause = %s)\n",
osmo_fsm_term_cause_name(cause));
+ _osmo_fsm_inst_term_children(fi, OSMO_FSM_TERM_PARENT, NULL,
+ file, line);
+
/* delete ourselves from the parent */
parent = fi->proc.parent;
if (parent) {
@@ -521,10 +524,6 @@ void _osmo_fsm_inst_term(struct osmo_fsm_inst *fi,
if (fi->fsm->cleanup)
fi->fsm->cleanup(fi, cause);
- /* terminate all children */
- _osmo_fsm_inst_term_children(fi, OSMO_FSM_TERM_PARENT, NULL,
- file, line);
-
LOGPFSMSRC(fi, file, line, "Freeing instance\n");
/* Fetch parent again in case it has changed. */
parent = fi->proc.parent;