osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/32207 )

Change subject: bsc_mgw_setup: use mgcp_client_pool_empty()
......................................................................

bsc_mgw_setup: use mgcp_client_pool_empty()

Don't fall back to the legacy config if the pool is configured but no
connection to any pool member can be established.

Depends: osmo-mgw I009483ac9dfd6627e414f14d43b89f40ea4644db
Related: OS#5993
Change-Id: I3a8418fb5841c71049ec91439143e1fe5553ed40
---
M TODO-RELEASE
M src/osmo-bsc/osmo_bsc_main.c
2 files changed, 22 insertions(+), 3 deletions(-)

Approvals:
  pespin: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved
  Jenkins Builder: Verified




diff --git a/TODO-RELEASE b/TODO-RELEASE
index 2658cdd..690e9ea 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -13,4 +13,5 @@
 libosmogsm     >1.8.0          circuit switched data stuff 
(gsm0808_enc/dec_channel_type etc.)
 libosmo-abis   >1.4.0          osmo_ortp.h: add RTP_PT_CSDATA
 libosmo-sccp >1.7.0            osmo_sccp_{get,set}_priv()
-libosmocore    >1.8.0  GSM48_IE_CIP_MODE_SET_HO and GSM48_IE_SYNC_IND_HO
\ No newline at end of file
+libosmocore    >1.8.0  GSM48_IE_CIP_MODE_SET_HO and GSM48_IE_SYNC_IND_HO
+libosmo-mgcp-client > 1.11.0   mgcp_client_pool_empty()
diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 5866ec1..50cc0e0 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -839,8 +839,12 @@
        /* Initialize MGW pool. This initalizes and connects all MGCP clients 
that are currently configured in
         * the pool. Adding additional MGCP clients to the pool is possible but 
the user has to configure and
         * (re)connect them manually from the VTY. */
-       pool_members_initalized = 
mgcp_client_pool_connect(bsc_gsmnet->mgw.mgw_pool);
-       if (pool_members_initalized) {
+       if (!mgcp_client_pool_empty(bsc_gsmnet->mgw.mgw_pool)) {
+               pool_members_initalized = 
mgcp_client_pool_connect(bsc_gsmnet->mgw.mgw_pool);
+               if (!pool_members_initalized) {
+                       LOGP(DNM, LOGL_ERROR, "MGW pool failed to initialize 
any pool members\n");
+                       return -EINVAL;
+               }
                LOGP(DNM, LOGL_NOTICE,
                     "MGW pool with %u pool members configured, (ignoring MGW 
configuration in VTY node 'msc').\n",
                     pool_members_initalized);

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I3a8418fb5841c71049ec91439143e1fe5553ed40
Gerrit-Change-Number: 32207
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to