diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-02-27 11:04:27 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-02-27 11:05:18 +0100 |
commit | 9ec030d32da5426e184179c4867b01b910885dec (patch) | |
tree | 8590afb1a90b87274fd0224606f6a6ac1d3353e9 /openbsc/tests/bsc-nat | |
parent | a9e9331285bccb97e3e9b8aeb5659b1fe119597b (diff) |
nat: Change number of multiplexes to the max-endpoints
Diffstat (limited to 'openbsc/tests/bsc-nat')
-rw-r--r-- | openbsc/tests/bsc-nat/bsc_nat_test.c | 7 |
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 ad7ce61af..1d9052d6f 100644 --- a/openbsc/tests/bsc-nat/bsc_nat_test.c +++ b/openbsc/tests/bsc-nat/bsc_nat_test.c @@ -435,7 +435,7 @@ static void test_mgcp_allocations(void) struct bsc_connection *bsc; struct bsc_nat *nat; struct sccp_connections con; - int i, j; + int i, j, multiplex; fprintf(stderr, "Testing MGCP.\n"); memset(&con, 0, sizeof(con)); @@ -449,7 +449,7 @@ static void test_mgcp_allocations(void) bsc = bsc_connection_alloc(nat); bsc->cfg = bsc_config_alloc(nat, "foo"); - bsc->cfg->number_multiplexes = 2; + bsc->cfg->max_endpoints = 60; bsc_config_add_lac(bsc->cfg, 2323); bsc->last_endpoint = 0x22; con.bsc = bsc; @@ -465,7 +465,8 @@ static void test_mgcp_allocations(void) ++i; } while(1); - for (i = 0; i < bsc->cfg->number_multiplexes; ++i) { + multiplex = bsc_mgcp_nr_multiplexes(bsc->cfg->max_endpoints); + for (i = 0; i < multiplex; ++i) { for (j = 0; j < 32; ++j) printf("%d", bsc->_endpoint_status[i*32 + j]); printf(": %d of %d\n", i*32 + 32, 32 * 8); |