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

lynxis lazus gerrit-no-reply at
Tue Apr 6 14:30:20 UTC 2021

lynxis lazus has submitted this change. ( )

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

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

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
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib6a1cc1fd84959e69c07b72ef780642205d2cd18
Gerrit-Change-Number: 23566
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus <lynxis at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at>
Gerrit-Reviewer: laforge <laforge at>
Gerrit-Reviewer: lynxis lazus <lynxis at>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list