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
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);
 }