gbproxy major rewrite for SGSN pool support

Rewrite of a large part of osmo-gbproxy in order to prepare
for SGSN pool support.  The amount of changes are of such fundamental
nature that it doesn't make sense to try to split this into hundreds
of individual changesets.

Related: OS#4472
Change-Id: Ie0746f17927a9509c3806cc80dc1a31d25df7937
diff --git a/src/gb_proxy_ctrl.c b/src/gb_proxy_ctrl.c
index 21e56dd..4561634 100644
--- a/src/gb_proxy_ctrl.c
+++ b/src/gb_proxy_ctrl.c
@@ -61,9 +61,11 @@
 	cmd->reply = talloc_strdup(cmd, "");
 
 	/* NS-VCs for SGSN */
-	nse = gprs_ns2_nse_by_nsei(nsi, cfg->nsip_sgsn_nsei);
-	if (nse)
-		gprs_ns2_nse_foreach_nsvc(nse, &ctrl_nsvc_state_cb, cmd);
+	hash_for_each(cfg->sgsn_nses, i, nse_peer, list) {
+		nse = gprs_ns2_nse_by_nsei(nsi, nse_peer->nsei);
+		if (nse)
+			gprs_ns2_nse_foreach_nsvc(nse, &ctrl_nsvc_state_cb, cmd);
+	}
 
 	/* NS-VCs for BSS peers */
 	hash_for_each(cfg->bss_nses, i, nse_peer, list) {
@@ -95,7 +97,7 @@
 					nse_peer->nsei, bvc->bvci,
 					raid.mcc, raid.mnc,
 					raid.lac, raid.rac,
-					bvc->blocked ? "BLOCKED" : "UNBLOCKED");
+					osmo_fsm_inst_state_name(bvc->fi));
 		}
 	}