osmith submitted this change.

View Change



4 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Approvals: pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved osmith: Verified
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(-)

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);

To view, visit change 32206. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I44e7b2723d801ceb03aaa2e5546802b4eb56b3c3
Gerrit-Change-Number: 32206
Gerrit-PatchSet: 5
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-MessageType: merged