Change in libosmocore[master]: gprs_ns2: sns: ensure the sns->alive state is correct

lynxis lazus gerrit-no-reply at lists.osmocom.org
Thu Apr 1 14:32:57 UTC 2021


lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/23566 )


Change subject: gprs_ns2: sns: ensure the sns->alive state is correct
......................................................................

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



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/66/23566/1

diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c
index b8c44f1..552e4b8 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_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);
 }
 

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib6a1cc1fd84959e69c07b72ef780642205d2cd18
Gerrit-Change-Number: 23566
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210401/c9a0d949/attachment.htm>


More information about the gerrit-log mailing list