gprs_ns2_sns: rework tracking of NS-VC unblocked/alive state
The SNS must know when all NS-VC have failed. Further more
there might be a corner case when the SNS configuration succeeds but
no NS-VC comes up afterwards.
Related: OS#5355
Change-Id: Ie72da9adeefe0c2850d49a9208b2d0a4556f9101
diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index de27fb4..ca47934 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -577,7 +577,7 @@
ns2_nse_notify_unblocked(nsvc, false);
/* check if sns is using this VC */
- ns2_sns_free_nsvc(nsvc);
+ ns2_sns_replace_nsvc(nsvc);
osmo_fsm_inst_term(nsvc->fi, OSMO_FSM_TERM_REQUEST, NULL);
/* let the driver/bind clean up it's internal state */
@@ -1175,6 +1175,7 @@
{
struct gprs_ns2_nse *nse = nsvc->nse;
+ ns2_sns_notify_alive(nse, nsvc, unblocked);
ns2_nse_data_sum(nse);
if (unblocked == nse->alive)