diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-09-19 04:36:07 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-09-20 02:51:30 +0800 |
commit | f2eedff052bd7f92655a32d5a57206018b310aec (patch) | |
tree | 7b8463698949f7db1c5060e961be4c273660ffa5 /openbsc/src/nat/bsc_mgcp_utils.c | |
parent | b98ba72e0a413a9d325fa8ed20cb77d28d472e2f (diff) |
nat: Send a transcoder reset on start up.
The transcoder RESET is using the same extensions to reset all
endpoints on a remote site. This makes sure that all allocations
can be made in a properly configured network.
Diffstat (limited to 'openbsc/src/nat/bsc_mgcp_utils.c')
-rw-r--r-- | openbsc/src/nat/bsc_mgcp_utils.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/openbsc/src/nat/bsc_mgcp_utils.c b/openbsc/src/nat/bsc_mgcp_utils.c index 765952768..b84a26232 100644 --- a/openbsc/src/nat/bsc_mgcp_utils.c +++ b/openbsc/src/nat/bsc_mgcp_utils.c @@ -663,6 +663,15 @@ int bsc_mgcp_nat_init(struct bsc_nat *nat) return -1; } + if (mgcp_reset_transcoder(cfg) < 0) { + LOGP(DMGCP, LOGL_ERROR, "Failed to send packet to the transcoder.\n"); + talloc_free(nat->bsc_endpoints); + nat->bsc_endpoints = NULL; + close(cfg->gw_fd.bfd.fd); + cfg->gw_fd.bfd.fd = -1; + return -1; + } + return 0; } |