aboutsummaryrefslogtreecommitdiffstats
path: root/src/gb/gprs_ns2_vc_fsm.c
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-10-27 13:05:56 +0100
committerlynxis lazus <lynxis@fe80.eu>2020-10-27 13:53:08 +0000
commit0346b643b52920490e3b632e1219efcd1075d0b1 (patch)
tree976f5001f22f9b611a6ddfce84e3152bccf6f5af /src/gb/gprs_ns2_vc_fsm.c
parent0a446a18044e66a89cf1cf229bead64a3ee2cf60 (diff)
gprs_ns2: remove the nsvc fsm timer when cleaning up the fsm
Diffstat (limited to 'src/gb/gprs_ns2_vc_fsm.c')
-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,