aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2021-01-31 18:56:29 +0100
committerlaforge <laforge@osmocom.org>2021-02-02 11:37:48 +0000
commit6a9ec42a95d55e6fd46568aa7ec4d2a96a9ef160 (patch)
tree6eb75217c527bd0be858ced0b0b0f66f9738c463
parent7fe8d71fee1fe69c86db171f73a07ea6b68fb828 (diff)
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
-rw-r--r--src/gb/gprs_ns2_vc_fsm.c7
1 files changed, 7 insertions, 0 deletions
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),