From cb6ad70994dc7686f1c89d803fcca1081b5ef32b Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 22 Jul 2014 15:00:52 +0200 Subject: mgcp: Change API to remove memory management from the name Jacob pointed out that "free_endp" refers to the memory of the endpoint being freed. What we want is actually a way to release an endpoint (and the resource it allocated) or in the case of the testcase/testapp initialize the data structure correctly. Introduce two names for that. --- openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'openbsc/src/osmo-bsc_nat') diff --git a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c index e13827b0b..4a0aaffd7 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c +++ b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c @@ -251,7 +251,7 @@ void bsc_mgcp_free_endpoints(struct bsc_nat *nat) for (i = 1; i < nat->mgcp_cfg->trunk.number_endpoints; ++i){ bsc_mgcp_free_endpoint(nat, i); - mgcp_free_endp(&nat->mgcp_cfg->trunk.endpoints[i]); + mgcp_release_endp(&nat->mgcp_cfg->trunk.endpoints[i]); } } @@ -621,7 +621,7 @@ static void free_chan_downstream(struct mgcp_endpoint *endp, struct bsc_endpoint } bsc_mgcp_free_endpoint(bsc->nat, ENDPOINT_NUMBER(endp)); - mgcp_free_endp(endp); + mgcp_release_endp(endp); } /* @@ -1065,6 +1065,6 @@ void bsc_mgcp_clear_endpoints_for(struct bsc_connection *bsc) rate_ctr_inc(ctr); bsc_mgcp_free_endpoint(bsc->nat, i); - mgcp_free_endp(&bsc->nat->mgcp_cfg->trunk.endpoints[i]); + mgcp_release_endp(&bsc->nat->mgcp_cfg->trunk.endpoints[i]); } } -- cgit v1.2.3