From 6590044337c1497393dd779f45c0b584f8027e3e Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 9 Feb 2018 09:58:57 +0000 Subject: 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 --- src/fsm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/fsm.c b/src/fsm.c index dd3538f9..d8751c9c 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; -- cgit v1.2.3