diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-02-25 20:38:15 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-02-26 10:42:01 +0100 |
commit | 7b07b2dcff72aa302b093beb3942c592b5103b91 (patch) | |
tree | f04741d1482d5ced08daf33c8107f7c0fe7add50 /openbsc/src/nat/bsc_mgcp_utils.c | |
parent | 86c1db63387bd0dde439a6625c40e9e653b1cf4d (diff) |
nat: Start making the number of multiplexes configurable
Introduce a VTY setting that right now needs to be set to
one. To make updating this setting possible we will now store
the number of endpoints in the bsc connection as well.
Diffstat (limited to 'openbsc/src/nat/bsc_mgcp_utils.c')
-rw-r--r-- | openbsc/src/nat/bsc_mgcp_utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsc/src/nat/bsc_mgcp_utils.c b/openbsc/src/nat/bsc_mgcp_utils.c index d814f0dc3..f00292645 100644 --- a/openbsc/src/nat/bsc_mgcp_utils.c +++ b/openbsc/src/nat/bsc_mgcp_utils.c @@ -48,6 +48,7 @@ static int bsc_init_endps_if_needed(struct bsc_connection *con) if (!con->cfg) return -1; + con->number_endpoints = 31 * con->cfg->number_multiplexes; con->_endpoint_status = talloc_zero_array(con, char, (32 * con->cfg->number_multiplexes) + 1); return con->_endpoint_status == NULL; @@ -55,7 +56,7 @@ static int bsc_init_endps_if_needed(struct bsc_connection *con) static int bsc_assign_endpoint(struct bsc_connection *bsc, struct sccp_connections *con) { - const int number_endpoints = 31 * bsc->cfg->number_multiplexes; + const int number_endpoints = bsc->number_endpoints; int i; for (i = 1; i <= number_endpoints; ++i) { |