osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/32206 )
(
4 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: msc_mgw_setup: use mgcp_client_pool_empty() ......................................................................
msc_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: I44e7b2723d801ceb03aaa2e5546802b4eb56b3c3 --- M TODO-RELEASE M src/osmo-msc/msc_main.c 2 files changed, 21 insertions(+), 2 deletions(-)
Approvals: pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved osmith: Verified
diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc..a2695f2 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +libosmo-mgcp-client > 1.11.0 mgcp_client_pool_empty() diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c index c87749d..7f60ea8 100644 --- a/src/osmo-msc/msc_main.c +++ b/src/osmo-msc/msc_main.c @@ -560,8 +560,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(msc_network->mgw.mgw_pool); - if (pool_members_initalized) { + if (!mgcp_client_pool_empty(msc_network->mgw.mgw_pool)) { + pool_members_initalized = mgcp_client_pool_connect(msc_network->mgw.mgw_pool); + if (!pool_members_initalized) { + LOGP(DMSC, LOGL_ERROR, "MGW pool failed to initialize any pool members\n"); + return -EINVAL; + } LOGP(DMSC, LOGL_NOTICE, "MGW pool with %u pool members configured, (ignoring MGW configuration in VTY node 'msc').\n", pool_members_initalized);