laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22579 )

Change subject: ns2: Stop test procedure when going into unconfigured state
......................................................................

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
---
M src/gb/gprs_ns2_vc_fsm.c
1 file changed, 7 insertions(+), 0 deletions(-)

Approvals:
  daniel: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



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),

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22579
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ida3685e42a753899f1bf177eefcc23352ec7440d
Gerrit-Change-Number: 22579
Gerrit-PatchSet: 5
Gerrit-Owner: laforge <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: lynxis lazus <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to