aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/nat/bsc_nat_utils.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-22 12:08:17 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-22 12:13:44 +0800
commitbbc2c6e76548047c7eaa7f5fbb22fd9fe1edde5f (patch)
treed71facf1a759a1ce4656b1ae49501bca38c9b3b3 /openbsc/src/nat/bsc_nat_utils.c
parent7e3724ad18119967cd0fbaaee601d3e0d06e5ad4 (diff)
nat: Change MGCP DLCX handling and send dummy MDCX to the BTS.
When setting a new MSC timeslot to a SCCP connection check if any of the existing connections have this timeslot, if so we will send a DLCX down the stream to make sure it is closed there, when we will CRCX this new timeslot we will happily reallocate it. When the SCCP connection goes away, or we get a DLCX from the network, or the BSC is gone we will send a DLCX message down the stream as well. When we receive a CRCX from the network we will forward the CRCX as usual and send a dummy MDCX after it. For the DLCX and the dummy MDCX we send a custom MGCP message that will not provoke an answer. Even if the downstream MGCP GW will answer we will ignore it due the dummy transaction id that is not used anywhere else. This change should make sure that we close the dowstream endpoint all the time, even when the DLCX arrives after the SCCP connection is torndown.
Diffstat (limited to 'openbsc/src/nat/bsc_nat_utils.c')
-rw-r--r--openbsc/src/nat/bsc_nat_utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/nat/bsc_nat_utils.c b/openbsc/src/nat/bsc_nat_utils.c
index d9fceaf8f..1e51737f1 100644
--- a/openbsc/src/nat/bsc_nat_utils.c
+++ b/openbsc/src/nat/bsc_nat_utils.c
@@ -100,7 +100,7 @@ void sccp_connection_destroy(struct sccp_connections *conn)
LOGP(DNAT, LOGL_DEBUG, "Destroy 0x%x <-> 0x%x mapping for con %p\n",
sccp_src_ref_to_int(&conn->real_ref),
sccp_src_ref_to_int(&conn->patched_ref), conn->bsc);
- bsc_mgcp_clear(conn);
+ bsc_mgcp_dlcx(conn);
llist_del(&conn->list_entry);
talloc_free(conn);
}