From 9ec030d32da5426e184179c4867b01b910885dec Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 27 Feb 2011 11:04:27 +0100 Subject: nat: Change number of multiplexes to the max-endpoints --- openbsc/tests/bsc-nat/bsc_nat_test.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'openbsc/tests/bsc-nat') 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); -- cgit v1.2.3