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
Oliver Smith 2023-04-04 14:48:55 +02:00
parent eb1de89024
commit 377c1e3fd7
2 changed files with 8 additions and 3 deletions

View File

@ -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
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()

View File

@ -839,8 +839,12 @@ static int bsc_mgw_setup(void)
/* 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;
"MGW pool with %u pool members configured, (ignoring MGW configuration in VTY node 'msc').\n",