aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-06 15:11:34 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-06 15:12:25 +0200
commit86f42eb6a5091805e5569edeed1f32b97124f720 (patch)
tree817ec02afc7043755543faceee923bfdcd53300e /openbsc/tests
parent494c086dca1fbfcfeaf0d2dbde4fd6f85e6552a8 (diff)
nat: Store the config in the connection instead of the lac
This allows that we can print the Nr. next to the lac and it allows us to change the lac at runtime without reconnecting the BSC.
Diffstat (limited to 'openbsc/tests')
-rw-r--r--openbsc/tests/bsc-nat/bsc_nat_test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/openbsc/tests/bsc-nat/bsc_nat_test.c b/openbsc/tests/bsc-nat/bsc_nat_test.c
index 593963291..40e2475ba 100644
--- a/openbsc/tests/bsc-nat/bsc_nat_test.c
+++ b/openbsc/tests/bsc-nat/bsc_nat_test.c
@@ -332,13 +332,15 @@ static void test_paging(void)
struct bsc_nat *nat;
struct bsc_connection *con;
struct bsc_nat_parsed *parsed;
+ struct bsc_config cfg;
struct msgb *msg;
fprintf(stderr, "Testing paging by lac.\n");
nat = bsc_nat_alloc();
con = bsc_connection_alloc(nat);
- con->lac = 23;
+ con->cfg = &cfg;
+ cfg.lac = 23;
con->authenticated = 1;
llist_add(&con->list_entry, &nat->bsc_connections);
msg = msgb_alloc(4096, "test");
@@ -360,7 +362,7 @@ static void test_paging(void)
talloc_free(parsed);
/* Test by finding it */
- con->lac = 8213;
+ 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) {