aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-10-27 13:05:56 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2020-10-27 13:09:52 +0100
commit3e14abdf060b39083c5af346c04935d9b4c000ae (patch)
tree64eb8c84674405fc664b36591b69d5e76e38eed2
parent0a2d9bdfae78c9bfddc8cc838abaddc508f210f1 (diff)
gprs_ns2: remove the nsvc fsm timer when cleaning up the fsmpespin/ns2
-rw-r--r--src/gb/gprs_ns2_vc_fsm.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gb/gprs_ns2_vc_fsm.c b/src/gb/gprs_ns2_vc_fsm.c
index d13f1ce6..451437f2 100644
--- a/src/gb/gprs_ns2_vc_fsm.c
+++ b/src/gb/gprs_ns2_vc_fsm.c
@@ -540,6 +540,14 @@ static void gprs_ns2_vc_fsm_allstate_action(struct osmo_fsm_inst *fi,
}
}
+static void gprs_ns2_vc_fsm_clean(struct osmo_fsm_inst *fi,
+ enum osmo_fsm_term_cause cause)
+{
+ struct gprs_ns2_vc_priv *priv = fi->priv;
+
+ osmo_timer_del(&priv->alive.timer);
+}
+
static struct osmo_fsm gprs_ns2_vc_fsm = {
.name = "GPRS-NS2-VC",
.states = gprs_ns2_vc_states,
@@ -549,7 +557,7 @@ static struct osmo_fsm gprs_ns2_vc_fsm = {
S(GPRS_NS2_EV_ALIVE) |
S(GPRS_NS2_EV_ALIVE_ACK),
.allstate_action = gprs_ns2_vc_fsm_allstate_action,
- .cleanup = NULL,
+ .cleanup = gprs_ns2_vc_fsm_clean,
.timer_cb = gprs_ns2_vc_fsm_timer_cb,
/* .log_subsys = DNS, "is not constant" */
.event_names = gprs_ns2_vc_event_names,