aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-09-19 20:54:21 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-09-20 02:46:57 +0800
commitd2df4cab43287c9014c2ecf1d9a34d237bb13e9b (patch)
treeda1cd5eb468ce663fd358565d9e151d26150ca55 /openbsc/tests
parentadb6e1cce10570a1b4ea1f55fce4813170c0b703 (diff)
nat: Test the endpoint finding a bit better...
Diffstat (limited to 'openbsc/tests')
-rw-r--r--openbsc/tests/bsc-nat/bsc_nat_test.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/openbsc/tests/bsc-nat/bsc_nat_test.c b/openbsc/tests/bsc-nat/bsc_nat_test.c
index 926c97cd7..e1a17acc9 100644
--- a/openbsc/tests/bsc-nat/bsc_nat_test.c
+++ b/openbsc/tests/bsc-nat/bsc_nat_test.c
@@ -440,6 +440,7 @@ static void test_mgcp_ass_tracking(void)
33);
bsc = bsc_connection_alloc(nat);
bsc->cfg = bsc_config_alloc(nat, "foo", 2323);
+ bsc->last_endpoint = 0x1a;
con.bsc = bsc;
msg = msgb_alloc(4096, "foo");
@@ -455,11 +456,11 @@ static void test_mgcp_ass_tracking(void)
abort();
}
- if (con.bsc_endp != 1) {
+ if (con.bsc_endp != 0x1b) {
fprintf(stderr, "Assigned timeslot should have been 1.\n");
abort();
}
- if (con.bsc->endpoint_status[1] != 1) {
+ if (con.bsc->endpoint_status[0x1b] != 1) {
fprintf(stderr, "The status on the BSC is wrong.\n");
abort();
}
@@ -467,7 +468,8 @@ static void test_mgcp_ass_tracking(void)
talloc_free(parsed);
bsc_mgcp_dlcx(&con);
- if (con.bsc_endp != -1 || con.msc_endp != -1 || con.bsc->endpoint_status[1] != 0) {
+ if (con.bsc_endp != -1 || con.msc_endp != -1 ||
+ con.bsc->endpoint_status[1] != 0 || con.bsc->last_endpoint != 0x1b) {
fprintf(stderr, "Clearing should remove the mapping.\n");
abort();
}