diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-12-12 20:15:28 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-12-16 11:33:27 +0100 |
commit | 57e9ca9fe9d07eb67cba49eb4780de7b0c11aa5b (patch) | |
tree | 75224a5910c484b772c8ab0ab9f409fc1e999084 /src/mgcp | |
parent | 2d115d4bbb5b725c84bb00e7dd9ac9130e3b0789 (diff) |
mgcp: Use the realloc callback when freeing the endpoint via the VTY
In case the endpoint is allocated and the VTY is used to force it
to be freed use the realloc_cb to make sure that any resources
allocated to it will be freed. The mgcp_ss7 binary will then call
mgcp_ss7_endp_free to free audio encoder resources.
Diffstat (limited to 'src/mgcp')
-rw-r--r-- | src/mgcp/mgcp_vty.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mgcp/mgcp_vty.c b/src/mgcp/mgcp_vty.c index 5a2362a..e3a7008 100644 --- a/src/mgcp/mgcp_vty.c +++ b/src/mgcp/mgcp_vty.c @@ -784,6 +784,8 @@ DEFUN(free_endp, free_endp_cmd, } endp = &trunk->endpoints[endp_no]; + if (endp->allocated && g_cfg->realloc_cb) + g_cfg->realloc_cb(trunk, ENDPOINT_NUMBER(endp)); mgcp_free_endp(endp); return CMD_SUCCESS; } |