Change in osmo-mgw[master]: mgcp_test: release endpoints after use

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Thu Aug 2 10:03:56 UTC 2018


dexter has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/06/10306/1

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: newchange
Gerrit-Change-Id: Ic13b4368162149ec36c93f4188fa4c71166e08d5
Gerrit-Change-Number: 10306
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180802/faa4c960/attachment.htm>


More information about the gerrit-log mailing list