Harald Welte has submitted this change and it was merged. (
https://gerrit.osmocom.org/10306 )
Change subject: mgcp_test: release endpoints after use
......................................................................
mgcp_test: release endpoints after use
The test function test_multilple_codec() in mgcp_test.c creates a
lot of connections, but it never releases them. Just freeing the
cfg object is not enough since the UDP ports stay open and this
may interfere with other tests that also create connections
(port numbers).
- Make sure all endpoints are released when test_multilple_codec()
is done.
Change-Id: Ic13b4368162149ec36c93f4188fa4c71166e08d5
---
M tests/mgcp/mgcp_test.c
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c
index df6ea2f..ea79485 100644
--- a/tests/mgcp/mgcp_test.c
+++ b/tests/mgcp/mgcp_test.c
@@ -1265,6 +1265,7 @@
struct in_addr addr;
struct mgcp_conn_rtp *conn = NULL;
char conn_id[256];
+ int i;
printf("Testing multiple payload types\n");
@@ -1398,6 +1399,9 @@
OSMO_ASSERT(conn);
OSMO_ASSERT(conn->end.codec->payload_type == 0);
+ for (i = 1; i < cfg->trunk.number_endpoints; i++)
+ mgcp_endp_release(&cfg->trunk.endpoints[i]);
+
talloc_free(cfg);
}
--
To view, visit https://gerrit.osmocom.org/10306
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic13b4368162149ec36c93f4188fa4c71166e08d5
Gerrit-Change-Number: 10306
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder