diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2009-11-18 17:38:20 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2009-11-20 17:35:46 +0100 |
commit | 6f93c6a1e0d3e4e189aacc0ea8fcc0f55246c896 (patch) | |
tree | 2dad9afa57d4f4a58d0d7d7039f4d32a78102383 /openbsc/src | |
parent | f97e48b0defeed17d54e4ba8d88a34f43de61919 (diff) |
[bsc] Unref the lchan when the MSC is closing the SCCP connection
Currently we are not sending the Inactivity Test message so the
MSC will close the specific sccp connection but we would keep the
lchan open and then end up with resource issues.
Change the code to close the lchan before closing the SCCP connection..
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/bsc_msc_ip.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/openbsc/src/bsc_msc_ip.c b/openbsc/src/bsc_msc_ip.c index c3f29a7b3..97dc42de0 100644 --- a/openbsc/src/bsc_msc_ip.c +++ b/openbsc/src/bsc_msc_ip.c @@ -139,7 +139,12 @@ void msc_outgoing_sccp_state(struct sccp_connection *conn, int old_state) if (conn->connection_state >= SCCP_CONNECTION_STATE_RELEASE_COMPLETE) { DEBUGP(DMSC, "Freeing sccp conn: %p state: %d\n", conn, conn->connection_state); if (sccp_get_lchan(conn->data_ctx) != NULL) { + struct gsm_lchan *lchan = sccp_get_lchan(conn->data_ctx); + DEBUGP(DMSC, "ERROR: The lchan is still associated\n."); + + lchan->msc_data = NULL; + put_lchan(lchan); } bss_sccp_free_data((struct bss_sccp_connection_data *)conn->data_ctx); |