mgcp_test: remove trunk2 from unit-test

Some of the unit-tests initalize a second trunk (trunk2) but the test
never do anything with this trunk. Lets remove it.

Change-Id: I228aa45160152091baac9d9c2e6486b774278b6a
Related: OS#2659
diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c
index 792ae1f..66f79b0 100644
--- a/tests/mgcp/mgcp_test.c
+++ b/tests/mgcp/mgcp_test.c
@@ -762,7 +762,6 @@
 	struct mgcp_config *cfg;
 	struct mgcp_endpoint *endp;
 	struct mgcp_trunk *trunk;
-	struct mgcp_trunk *trunk2;
 	int i;
 	struct mgcp_conn_rtp *conn = NULL;
 	char last_conn_id[256];
@@ -777,9 +776,6 @@
 
 	memset(last_conn_id, 0, sizeof(last_conn_id));
 
-	trunk2 = mgcp_trunk_alloc(cfg, MGCP_TRUNK_E1, 1);
-        mgcp_trunk_alloc_endpts(trunk2);
-
 	for (i = 0; i < ARRAY_SIZE(tests); i++) {
 		const struct mgcp_test *t = &tests[i];
 		struct msgb *inp;
@@ -896,7 +892,6 @@
 		}
 	}
 
-	mgcp_endpoints_release(trunk2);
 	mgcp_endpoints_release(trunk);
 	talloc_free(cfg);
 }
@@ -905,7 +900,6 @@
 {
 	struct mgcp_config *cfg;
 	struct mgcp_trunk *trunk;
-	struct mgcp_trunk *trunk2;
 	int i;
 	char last_conn_id[256];
 	int rc;
@@ -918,9 +912,6 @@
 
 	memset(last_conn_id, 0, sizeof(last_conn_id));
 
-	trunk2 = mgcp_trunk_alloc(cfg, MGCP_TRUNK_E1, 1);
-        mgcp_trunk_alloc_endpts(trunk2);
-
 	for (i = 0; i < ARRAY_SIZE(retransmit); i++) {
 		const struct mgcp_test *t = &retransmit[i];
 		struct msgb *inp;
@@ -959,7 +950,6 @@
 		msgb_free(msg);
 	}
 
-	mgcp_endpoints_release(trunk2);
 	mgcp_endpoints_release(trunk);
 	talloc_free(cfg);
 }
@@ -975,7 +965,6 @@
 {
 	struct mgcp_config *cfg;
 	struct mgcp_trunk *trunk;
-	struct mgcp_trunk *trunk2;
 	struct msgb *inp, *msg;
 	char conn_id[256];
 
@@ -986,9 +975,6 @@
 	trunk->vty_number_endpoints = 64;
         mgcp_trunk_alloc_endpts(trunk);
 
-	trunk2 = mgcp_trunk_alloc(cfg, MGCP_TRUNK_E1, 1);
-        mgcp_trunk_alloc_endpts(trunk2);
-
 	inp = create_msg(CRCX, NULL);
 	msg = mgcp_handle_message(cfg, inp);
 	OSMO_ASSERT(msg);
@@ -1016,7 +1002,6 @@
 	inp = create_msg(DLCX, conn_id);
 	msgb_free(mgcp_handle_message(cfg, inp));
 	msgb_free(inp);
-	mgcp_endpoints_release(trunk2);
 	mgcp_endpoints_release(trunk);
 	talloc_free(cfg);
 }
@@ -1384,7 +1369,6 @@
 {
 	struct mgcp_config *cfg;
 	struct mgcp_trunk *trunk;
-	struct mgcp_trunk *trunk2;
 	struct mgcp_endpoint *endp;
 	struct msgb *inp, *resp;
 	struct in_addr addr;
@@ -1399,9 +1383,6 @@
         mgcp_trunk_alloc_endpts(trunk);
 	cfg->policy_cb = mgcp_test_policy_cb;
 
-	trunk2 = mgcp_trunk_alloc(cfg, MGCP_TRUNK_E1, 1);
-        mgcp_trunk_alloc_endpts(trunk2);
-
 	/* Allocate endpoint 1@mgw with two codecs */
 	last_endpoint[0] = '\0';
 	inp = create_msg(CRCX_MULT_1, NULL);
@@ -1531,7 +1512,6 @@
 	OSMO_ASSERT(conn);
 	OSMO_ASSERT(conn->end.codec->payload_type == 0);
 
-	mgcp_endpoints_release(trunk2);
 	mgcp_endpoints_release(trunk);
 	talloc_free(cfg);
 }
@@ -1591,7 +1571,6 @@
 static void test_no_name(void)
 {
 	struct mgcp_trunk *trunk;
-	struct mgcp_trunk *trunk2;
 	struct mgcp_config *cfg;
 	struct msgb *inp, *msg;
 
@@ -1605,9 +1584,6 @@
 
 	cfg->policy_cb = mgcp_test_policy_cb;
 
-	trunk2 = mgcp_trunk_alloc(cfg, MGCP_TRUNK_E1, 1);
-        mgcp_trunk_alloc_endpts(trunk2);
-
 	inp = create_msg(CRCX, NULL);
 	msg = mgcp_handle_message(cfg, inp);
 
@@ -1619,7 +1595,6 @@
 	msgb_free(inp);
 	msgb_free(msg);
 
-	mgcp_endpoints_release(trunk2);
 	mgcp_endpoints_release(trunk);
 	talloc_free(cfg);
 }