osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/32208 )
Change subject: hnbgw_mgw_setup: use mgcp_client_pool_empty() ......................................................................
hnbgw_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: Icf3f3f0524c9d27f645c68851aaf9c6f33842927 --- M TODO-RELEASE M src/osmo-hnbgw/hnbgw.c 2 files changed, 25 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/08/32208/1
diff --git a/TODO-RELEASE b/TODO-RELEASE index cec63db..cf72895 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -10,3 +10,4 @@ osmo-hnbgw cfg config deprecated: 'sccp cr max-payload-len <0-999999>' libosmo-sigtran >=1.7.0 Ensure SCCP CR max payload length of 130 bytes is enforced. Uses osmo_scu_prim_hdr_name_c() +libosmo-mgcp-client > 1.11.0 mgcp_client_pool_empty() diff --git a/src/osmo-hnbgw/hnbgw.c b/src/osmo-hnbgw/hnbgw.c index 0624803..14f04af 100644 --- a/src/osmo-hnbgw/hnbgw.c +++ b/src/osmo-hnbgw/hnbgw.c @@ -693,12 +693,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(g_hnb_gw->mgw_pool); - if (pool_members_initalized) { - LOGP(DMGW, LOGL_NOTICE, - "MGW pool with %u pool members configured, (ignoring MGW configuration in VTY node 'mgcp').\n", - pool_members_initalized); - return 0; + if (!mgcp_client_pool_empty(g_hnb_gw->mgw_pool)) { + pool_members_initalized = mgcp_client_pool_connect(g_hnb_gw->mgw_pool); + if (pool_members_initalized) { + LOGP(DMGW, LOGL_NOTICE, + "MGW pool with %u pool members configured, (ignoring MGW configuration in VTY node 'mgcp').\n", + pool_members_initalized); + return 0; + } + LOGP(DMGW, 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