From 6a9ec42a95d55e6fd46568aa7ec4d2a96a9ef160 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 31 Jan 2021 18:56:29 +0100 Subject: 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 --- src/gb/gprs_ns2_vc_fsm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gb/gprs_ns2_vc_fsm.c b/src/gb/gprs_ns2_vc_fsm.c index c77bc4d9..f4c4e463 100644 --- a/src/gb/gprs_ns2_vc_fsm.c +++ b/src/gb/gprs_ns2_vc_fsm.c @@ -225,6 +225,12 @@ static void alive_timeout_handler(void *data) } } + +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 @@ static const struct osmo_fsm_state ns2_vc_states[] = { .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), -- cgit v1.2.3