diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-02-28 14:37:03 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-02-28 19:40:53 +0100 |
commit | 1f0c5b47426b4236ae0c91c71bc0d14a157f222f (patch) | |
tree | ef10bc6a84e9618220d90738410267db8e4b39be /openbsc/src/mgcp/mgcp_protocol.c | |
parent | 74e61110e5f8231dd11a921252157dd924aefce6 (diff) |
mgcp: Allocate the endpoints for the E1 trunks as well.
Diffstat (limited to 'openbsc/src/mgcp/mgcp_protocol.c')
-rw-r--r-- | openbsc/src/mgcp/mgcp_protocol.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/openbsc/src/mgcp/mgcp_protocol.c b/openbsc/src/mgcp/mgcp_protocol.c index 46214a559..b95cc81a8 100644 --- a/openbsc/src/mgcp/mgcp_protocol.c +++ b/openbsc/src/mgcp/mgcp_protocol.c @@ -942,15 +942,12 @@ static void mgcp_rtp_end_init(struct mgcp_rtp_end *end) end->rtcp.fd = -1; } -int mgcp_endpoints_allocate(struct mgcp_config *cfg) +int mgcp_endpoints_allocate(struct mgcp_trunk_config *tcfg) { - struct mgcp_trunk_config *tcfg; int i; - tcfg = &cfg->trunk; - /* Initialize all endpoints */ - tcfg->endpoints = _talloc_zero_array(cfg, + tcfg->endpoints = _talloc_zero_array(tcfg->cfg, sizeof(struct mgcp_endpoint), tcfg->number_endpoints, "endpoints"); if (!tcfg->endpoints) @@ -958,7 +955,7 @@ int mgcp_endpoints_allocate(struct mgcp_config *cfg) for (i = 0; i < tcfg->number_endpoints; ++i) { tcfg->endpoints[i].ci = CI_UNUSED; - tcfg->endpoints[i].cfg = cfg; + tcfg->endpoints[i].cfg = tcfg->cfg; tcfg->endpoints[i].tcfg = tcfg; mgcp_rtp_end_init(&tcfg->endpoints[i].net_end); mgcp_rtp_end_init(&tcfg->endpoints[i].bts_end); |