aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-08-28 16:08:39 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-08-29 16:35:24 +0800
commitf4b343920668280b39ddb95209f6ab0ceccab630 (patch)
tree20244d3e611e6ff966c9cb4ab2879943c39c2bc4 /openbsc/tests
parent591003328dac804592c8a5dc749d93d5e0be4347 (diff)
nat: Make the code work in terms of endpoints instead of timeslot/multiplex
We are going to have more than one trunk, so all code hardcoding the multiplex to zero must go. Avoid this kind of problem by saving the MGCP endpoint number and comparing that.
Diffstat (limited to 'openbsc/tests')
-rw-r--r--openbsc/tests/bsc-nat/bsc_nat_test.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/openbsc/tests/bsc-nat/bsc_nat_test.c b/openbsc/tests/bsc-nat/bsc_nat_test.c
index c5234aa24..b7a89c5b7 100644
--- a/openbsc/tests/bsc-nat/bsc_nat_test.c
+++ b/openbsc/tests/bsc-nat/bsc_nat_test.c
@@ -449,19 +449,19 @@ static void test_mgcp_ass_tracking(void)
abort();
}
- if (con.msc_timeslot != 21) {
+ if (con.msc_endp != 21) {
fprintf(stderr, "Timeslot should be 21.\n");
abort();
}
- if (con.bsc_timeslot != 21) {
+ if (con.bsc_endp != 21) {
fprintf(stderr, "Assigned timeslot should have been 21.\n");
abort();
}
talloc_free(parsed);
bsc_mgcp_dlcx(&con);
- if (con.bsc_timeslot != -1 || con.msc_timeslot != -1) {
+ if (con.bsc_endp != -1 || con.msc_endp != -1) {
fprintf(stderr, "Clearing should remove the mapping.\n");
abort();
}
@@ -483,8 +483,8 @@ static void test_mgcp_find(void)
llist_add(&con->list_entry, &nat->bsc_connections);
sccp_con = talloc_zero(con, struct sccp_connections);
- sccp_con->msc_timeslot = 12;
- sccp_con->bsc_timeslot = 12;
+ sccp_con->msc_endp = 12;
+ sccp_con->bsc_endp = 12;
sccp_con->bsc = con;
llist_add(&sccp_con->list_entry, &nat->sccp_connections);
@@ -498,13 +498,6 @@ static void test_mgcp_find(void)
abort();
}
- sccp_con->msc_timeslot = 0;
- sccp_con->bsc_timeslot = 0;
- if (bsc_mgcp_find_con(nat, 1) != sccp_con) {
- fprintf(stderr, "Didn't find the connection\n");
- abort();
- }
-
/* free everything */
talloc_free(nat);
}