diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2021-04-01 15:29:16 +0200 |
---|---|---|
committer | lynxis lazus <lynxis@fe80.eu> | 2021-04-06 14:30:19 +0000 |
commit | cdb2baaa0cd04cff251d4a1cfcc40b2866fae763 (patch) | |
tree | 4d7b1c745ca05fcb3d9bceb7d8fe91bd46eca32d | |
parent | gprs_ns2: nsvc_fsm: reorder notification st_alive_on_enter() (diff) | |
download | libosmocore-cdb2baaa0cd04cff251d4a1cfcc40b2866fae763.tar.xz libosmocore-cdb2baaa0cd04cff251d4a1cfcc40b2866fae763.zip |
gprs_ns2: sns: ensure the sns->alive state is correct
The SNS fsms also track the NSE however since the NSVC
starts now in ALIVE for SNS the SNS must check when synchronize
the alive state when entering the ST_CONFIGURED.
Related: SYS#5416
Change-Id: Ib6a1cc1fd84959e69c07b72ef780642205d2cd18
-rw-r--r-- | src/gb/gprs_ns2_sns.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c index b8c44f1f..552e4b8e 100644 --- a/src/gb/gprs_ns2_sns.c +++ b/src/gb/gprs_ns2_sns.c @@ -1355,7 +1355,19 @@ static void ns2_sns_st_configured(struct osmo_fsm_inst *fi, uint32_t event, void static void ns2_sns_st_configured_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) { + struct gprs_ns2_vc *nsvc; + struct ns2_sns_state *gss = (struct ns2_sns_state *) fi->priv; struct gprs_ns2_nse *nse = nse_inst_from_fi(fi); + /* NS-VC status updates are only parsed in ST_CONFIGURED. + * Do an initial check if there are any nsvc alive atm */ + llist_for_each_entry(nsvc, &nse->nsvc, list) { + if (ns2_vc_is_unblocked(nsvc)) { + gss->alive = true; + osmo_timer_del(&fi->timer); + break; + } + } + ns2_prim_status_ind(nse, NULL, 0, GPRS_NS2_AFF_CAUSE_SNS_CONFIGURED); } |