diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-09-18 03:16:52 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-09-18 03:16:52 +0800 |
commit | 95cac74e37171904125b247cfe1ad289cc2d864d (patch) | |
tree | 96ea712cc54411f02211da3242cd1c1a0f9a992d | |
parent | e40bc38c422493c1c703ead9ee5d38ae4699e5e4 (diff) |
mgw: Add a realloc_cb that will give up the old endpoint
Free the endpoint if we need to realloc, the sequencing
and blocking will take care of everything.
-rw-r--r-- | src/mgcp_ss7.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mgcp_ss7.c b/src/mgcp_ss7.c index a6306a1..799efa2 100644 --- a/src/mgcp_ss7.c +++ b/src/mgcp_ss7.c @@ -597,6 +597,12 @@ static int reset_cb(struct mgcp_config *cfg) return 0; } +static int realloc_cb(struct mgcp_config *cfg, int endp) +{ + mgcp_ss7_endp_free((struct mgcp_ss7 *) cfg->data, endp); + return 0; +} + static void mgcp_ss7_set_default(struct mgcp_config *cfg) { /* do not attempt to allocate call ids */ @@ -622,6 +628,7 @@ static struct mgcp_ss7 *mgcp_ss7_init(struct mgcp_config *cfg) conf->cfg->policy_cb = mgcp_ss7_policy; conf->cfg->reset_cb = reset_cb; + conf->cfg->realloc_cb = realloc_cb; conf->cfg->data = conf; |