diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2017-06-12 11:43:44 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-07-12 23:42:46 +0200 |
commit | 62afc1467a4de533370c9592abaa956d77c40665 (patch) | |
tree | 2cdab69fc5b7eab6a7db97a3fdd3cd89116d2794 | |
parent | 1b312c97955aafe62eb4d9f316c1b3f84f41a23d (diff) |
Revert "mgcp: make sure all endpoints are closed on startup"
Clearing all endpoints by sending a DLCX on startup has ben found
to be a bit too offensive. It also will not help against
inconsitancies that may occour during runtime (e.g. an overheard
DLCX during regular call teardown).
This reverts commit b669ea94cb78fd9b56ee8dd9392538151349f8ba.
Change-Id: Ia3bd8bfe9a09e300cf11629f7d7e3012ca8f394d
-rw-r--r-- | include/openbsc/msc_ifaces.h | 1 | ||||
-rw-r--r-- | src/libmgcp/mgcpgw_client.c | 3 | ||||
-rw-r--r-- | src/libmsc/msc_ifaces.c | 18 | ||||
-rw-r--r-- | src/osmo-msc/msc_main.c | 4 |
4 files changed, 1 insertions, 25 deletions
diff --git a/include/openbsc/msc_ifaces.h b/include/openbsc/msc_ifaces.h index d9f681f2d..e278f9305 100644 --- a/include/openbsc/msc_ifaces.h +++ b/include/openbsc/msc_ifaces.h @@ -56,4 +56,3 @@ int msc_tx_common_id(struct gsm_subscriber_connection *conn); int msc_call_assignment(struct gsm_trans *trans); int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2); void msc_call_release(struct gsm_trans *trans); -void msc_call_release_all(struct mgcpgw_client *mgcp); diff --git a/src/libmgcp/mgcpgw_client.c b/src/libmgcp/mgcpgw_client.c index 4ccff844b..0c5b5caf7 100644 --- a/src/libmgcp/mgcpgw_client.c +++ b/src/libmgcp/mgcpgw_client.c @@ -402,8 +402,7 @@ int mgcpgw_client_connect(struct mgcpgw_client *mgcp) mgcp->remote_addr = htonl(addr.sin_addr.s_addr); - osmo_wqueue_init(wq, (mgcp->actual.last_endpoint - mgcp->actual.first_endpoint) + 10); - + osmo_wqueue_init(wq, 10); wq->bfd.when = BSC_FD_READ; wq->bfd.data = mgcp; wq->read_cb = mgcp_do_read; diff --git a/src/libmsc/msc_ifaces.c b/src/libmsc/msc_ifaces.c index 5d019cf40..3dbe7c3e9 100644 --- a/src/libmsc/msc_ifaces.c +++ b/src/libmsc/msc_ifaces.c @@ -356,21 +356,3 @@ void msc_call_release(struct gsm_trans *trans) /* Release endpoint id */ mgcpgw_client_release_endpoint(conn->iu.mgcp_rtp_endpoint, mgcp); } - -void msc_call_release_all(struct mgcpgw_client *mgcp) -{ - struct msgb *msg; - unsigned int i; - - uint16_t first_endpoint = mgcp->actual.first_endpoint; - uint16_t last_endpoint = mgcp->actual.last_endpoint; - - for (i = first_endpoint; i < last_endpoint; i++) { - msg = mgcp_msg_dlcx(mgcp, i); - if (mgcpgw_client_tx(mgcp, msg, NULL, NULL)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send DLCX message for endpoint %u\n", i); - - mgcpgw_client_release_endpoint(i, mgcp); - } -} diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c index 4319b84e2..83d8fa4aa 100644 --- a/src/osmo-msc/msc_main.c +++ b/src/osmo-msc/msc_main.c @@ -496,10 +496,6 @@ TODO: we probably want some of the _net_ ctrl commands from bsc_base_ctrl_cmds_i return 7; } - /* Make sure all mgcp endpoints are cleared */ - msc_call_release_all(msc_network->mgcpgw.client); - - /* Set up A-Interface */ /* TODO: implement A-Interface and remove above legacy stuff. */ |