diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-06 15:11:34 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-15 20:24:12 +0800 |
commit | 47dd4944ae36d7c1fa91187d355512d99d4bd137 (patch) | |
tree | 93179919c6ec8bab78f9997aed831d1e433bff0a /openbsc/tests | |
parent | a7c377d593b88cd6ac91e59d2d75c6d873282590 (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.c | 6 |
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) { |