aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/bsc-nat/bsc_nat_test.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-17 08:07:19 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-06-15 20:24:14 +0800
commit979a309c940118f591b3f3f228602a75229135c7 (patch)
tree955e6ffdee006fd7c8e63e4358468a719fa60db3 /openbsc/tests/bsc-nat/bsc_nat_test.c
parentc615c260ea234e60ee18c2bef55e48aff05a806c (diff)
nat: Print the LAC that was searched for and not found.
Diffstat (limited to 'openbsc/tests/bsc-nat/bsc_nat_test.c')
-rw-r--r--openbsc/tests/bsc-nat/bsc_nat_test.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/openbsc/tests/bsc-nat/bsc_nat_test.c b/openbsc/tests/bsc-nat/bsc_nat_test.c
index 40e2475b..12141ef7 100644
--- a/openbsc/tests/bsc-nat/bsc_nat_test.c
+++ b/openbsc/tests/bsc-nat/bsc_nat_test.c
@@ -329,6 +329,7 @@ static void test_contrack()
static void test_paging(void)
{
+ int lac;
struct bsc_nat *nat;
struct bsc_connection *con;
struct bsc_nat_parsed *parsed;
@@ -347,7 +348,7 @@ static void test_paging(void)
/* Test completely bad input */
copy_to_msg(msg, paging_by_lac_cmd, sizeof(paging_by_lac_cmd));
- if (bsc_nat_find_bsc(nat, msg) != 0) {
+ if (bsc_nat_find_bsc(nat, msg, &lac) != 0) {
fprintf(stderr, "Should have not found anything.\n");
abort();
}
@@ -355,7 +356,7 @@ static void test_paging(void)
/* Test it by not finding it */
copy_to_msg(msg, paging_by_lac_cmd, sizeof(paging_by_lac_cmd));
parsed = bsc_nat_parse(msg);
- if (bsc_nat_find_bsc(nat, msg) != 0) {
+ if (bsc_nat_find_bsc(nat, msg, &lac) != 0) {
fprintf(stderr, "Should have not found aynthing.\n");
abort();
}
@@ -365,7 +366,7 @@ static void test_paging(void)
cfg.lac = 8213;
copy_to_msg(msg, paging_by_lac_cmd, sizeof(paging_by_lac_cmd));
parsed = bsc_nat_parse(msg);
- if (bsc_nat_find_bsc(nat, msg) != con) {
+ if (bsc_nat_find_bsc(nat, msg, &lac) != con) {
fprintf(stderr, "Should have found it.\n");
abort();
}