ns2: Stop test procedure when going into unconfigured state
When we're unconfigured and not yet started, we should not transmit
NS-ALIVE.
Change-Id: Ida3685e42a753899f1bf177eefcc23352ec7440d
Related: OS#4999
diff --git a/src/gb/gprs_ns2_vc_fsm.c b/src/gb/gprs_ns2_vc_fsm.c
index c77bc4d..f4c4e46 100644
--- a/src/gb/gprs_ns2_vc_fsm.c
+++ b/src/gb/gprs_ns2_vc_fsm.c
@@ -225,6 +225,12 @@
}
}
+
+static void ns2_st_unconfigured_onenter(struct osmo_fsm_inst *fi, uint32_t old_state)
+{
+ stop_test_procedure(fi->priv);
+}
+
static void ns2_st_unconfigured(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
struct gprs_ns2_vc_priv *priv = fi->priv;
@@ -433,6 +439,7 @@
.out_state_mask = S(GPRS_NS2_ST_RESET) | S(GPRS_NS2_ST_ALIVE),
.name = "UNCONFIGURED",
.action = ns2_st_unconfigured,
+ .onenter = ns2_st_unconfigured_onenter,
},
[GPRS_NS2_ST_RESET] = {
.in_event_mask = S(GPRS_NS2_EV_RX_RESET_ACK) | S(GPRS_NS2_EV_RX_RESET),