pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/33306 )
Change subject: Use new mgcp_client_conf_alloc() API to alloc mgcp_client_conf ......................................................................
Use new mgcp_client_conf_alloc() API to alloc mgcp_client_conf
Depends: osmo-mgw.git Change-Id Iba0853ed099a32cf1dde78c17e1b34343db41cfc Change-Id: I382046bba67646a7365d9290d604b97c9d886e02 --- M TODO-RELEASE M include/osmocom/msc/gsm_data.h M src/libmsc/msc_vty.c M src/osmo-msc/msc_main.c M tests/msc_vlr/msc_vlr_tests.c 5 files changed, 19 insertions(+), 9 deletions(-)
Approvals: osmith: Looks good to me, approved Jenkins Builder: Verified
diff --git a/TODO-RELEASE b/TODO-RELEASE index a2c7f6a..1777f34 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,5 +7,5 @@ # 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() +libosmo-mgcp-client > 1.11.0 mgcp_client_pool_empty(), mgcp_client_conf_alloc() MNCC osmo-sip-connector should do full SDP via MNCC and be released at the same time as the next osmo-msc, ask neels, thanks diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 1cf6820..2be4c35 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -216,7 +216,7 @@
struct { struct osmo_tdef *tdefs; - struct mgcp_client_conf conf; + struct mgcp_client_conf *conf; /* MGW pool, also includes the single MGCP client as fallback if no * pool is configured. */ struct mgcp_client_pool *mgw_pool; diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 5e3a222..d1b74c8 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -2071,7 +2071,7 @@ osmo_tdef_vty_groups_init(MSC_NODE, msc_tdef_group);
/* Deprecated: Old MGCP config without pooling support in MSC node: */ - mgcp_client_vty_init(msc_network, MSC_NODE, &msc_network->mgw.conf); + mgcp_client_vty_init(msc_network, MSC_NODE, msc_network->mgw.conf);
#ifdef BUILD_IU ranap_iu_vty_init(MSC_NODE, (enum ranap_nsap_addr_enc*)&msc_network->iu.rab_assign_addr_enc); diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c index a742771..02a85f5 100644 --- a/src/osmo-msc/msc_main.c +++ b/src/osmo-msc/msc_main.c @@ -257,7 +257,7 @@ net->gsup_server_port = MSC_HLR_REMOTE_PORT_DEFAULT;
net->mgw.mgw_pool = mgcp_client_pool_alloc(net); - mgcp_client_conf_init(&net->mgw.conf); + net->mgw.conf = mgcp_client_conf_alloc(net); net->call_waiting = true; net->lcls_permitted = false;
@@ -575,15 +575,15 @@ /* Initialize and connect a single MGCP client. This MGCP client will appear as the one and only pool * member if there is no MGW pool configured. */ LOGP(DMSC, LOGL_NOTICE, "No MGW pool configured, using MGW configuration in VTY node 'msc'\n"); - mgcp_client_single = mgcp_client_init(msc_network, &msc_network->mgw.conf); + mgcp_client_single = mgcp_client_init(msc_network, msc_network->mgw.conf); if (!mgcp_client_single) { LOGP(DMSC, LOGL_ERROR, "MGW (single) client initalization failed\n"); return -EINVAL; } if (mgcp_client_connect(mgcp_client_single)) { LOGP(DMSC, LOGL_ERROR, "MGW (single) connect failed at (%s:%u)\n", - msc_network->mgw.conf.remote_addr, - msc_network->mgw.conf.remote_port); + msc_network->mgw.conf->remote_addr, + msc_network->mgw.conf->remote_port); return -EINVAL; } mgcp_client_pool_register_single(msc_network->mgw.mgw_pool, mgcp_client_single); diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 7264753..8009cf7 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -1235,10 +1235,10 @@ INIT_LLIST_HEAD(&net->iu.sri->ran_conns);
net->mgw.tdefs = g_mgw_tdefs; - mgcp_client_conf_init(&net->mgw.conf); net->mgw.tdefs = g_mgw_tdefs; + net->mgw.conf = mgcp_client_conf_alloc(net); net->mgw.mgw_pool = mgcp_client_pool_alloc(net); - client = mgcp_client_init(net, &net->mgw.conf); + client = mgcp_client_init(net, net->mgw.conf); mgcp_client_pool_register_single(net->mgw.mgw_pool, client); return net; }