aboutsummaryrefslogtreecommitdiffstats
path: root/src/xua_as_fsm.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-11-20 21:00:37 +0100
committerHarald Welte <laforge@gnumonks.org>2017-11-20 20:48:39 +0000
commit081ac9c0292298f7992916d8f1b64faf764d4174 (patch)
treeefcb36ac8965d00432d4476afb668ea95c3b420a /src/xua_as_fsm.c
parent646f47d5a33b945397acea833b326c1e244e827a (diff)
xua_as[p]_fsm: Use osmo_timer_del() on FSM cleanup
When we destroy a FSM, we (logically) must osmo_timer_del() any running timers that the FSM might have been using. This was not implemented for xua_as_fsm, xua_asp_fsm and also missing from ipa_asp_fsm. Change-Id: I670df831d7bc30de48ed4277648a461e1e1968fa Related: OS#2668
Diffstat (limited to 'src/xua_as_fsm.c')
-rw-r--r--src/xua_as_fsm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c
index 59a71ba..5757d63 100644
--- a/src/xua_as_fsm.c
+++ b/src/xua_as_fsm.c
@@ -315,6 +315,13 @@ static void xua_as_fsm_pending(struct osmo_fsm_inst *fi, uint32_t event, void *d
}
}
+static void xua_as_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause)
+{
+ struct xua_as_fsm_priv *xafp = (struct xua_as_fsm_priv *) fi->priv;
+
+ osmo_timer_del(&xafp->recovery.t_r);
+}
+
static const struct osmo_fsm_state xua_as_fsm_states[] = {
[XUA_AS_S_DOWN] = {
.in_event_mask = S(XUA_ASPAS_ASP_INACTIVE_IND) |
@@ -368,6 +375,7 @@ struct osmo_fsm xua_as_fsm = {
.num_states = ARRAY_SIZE(xua_as_fsm_states),
.log_subsys = DLSS7,
.event_names = xua_as_event_names,
+ .cleanup = xua_as_fsm_cleanup,
};
/*! \brief Start an AS FSM for a given Application Server