From 47dd4944ae36d7c1fa91187d355512d99d4bd137 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 6 Apr 2010 15:11:34 +0200 Subject: 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. --- openbsc/tests/bsc-nat/bsc_nat_test.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'openbsc/tests') 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) { -- cgit v1.2.3