osmith has uploaded this change for review. ( 
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, 26 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/07/32207/1

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..c6afb50 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -839,12 +839,16 @@
        /* 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) {
-               LOGP(DNM, LOGL_NOTICE,
-                    "MGW pool with %u pool members configured, (ignoring MGW 
configuration in VTY node 'msc').\n",
-                    pool_members_initalized);
-               return 0;
+       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_NOTICE,
+                            "MGW pool with %u pool members configured, 
(ignoring MGW configuration in VTY node 'msc').\n",
+                            pool_members_initalized);
+                       return 0;
+               }
+               LOGP(DNM, LOGL_ERROR, "MGW pool failed to configure any pool 
members\n");
+               return -EINVAL;
        }

        /* Initialize and connect a single MGCP client. This MGCP client will 
appear as the one and only pool

--
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: 1
Gerrit-Owner: osmith <[email protected]>
Gerrit-MessageType: newchange

Reply via email to