aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-12-22 23:17:50 +0100
committerHarald Welte <laforge@gnumonks.org>2010-12-26 10:01:41 +0100
commitbaa953ba95e46df1ec449d2675ee9d1ed2b21164 (patch)
treee1d74d06e69aef7cb5af320eb43abce7619e7c12 /openbsc/src
parentc13efee3c50e58ad9b0de85bf1e1eabdc8173ea3 (diff)
mncc_sock: Clear all calls if MNCC application (LCR) disconnects
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/gsm_04_08.c12
-rw-r--r--openbsc/src/mncc_sock.c4
2 files changed, 15 insertions, 1 deletions
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index 64308bcad..3c65a5bf7 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -330,6 +330,18 @@ void gsm0408_clear_request(struct gsm_subscriber_connection *conn, uint32_t caus
}
}
+void gsm0408_clear_all_trans(struct gsm_network *net, int protocol)
+{
+ struct gsm_trans *trans, *temp;
+
+ LOGP(DCC, LOGL_NOTICE, "Clearing all currently active transactions!!!\n");
+
+ llist_for_each_entry_safe(trans, temp, &net->trans_list, entry) {
+ if (trans->protocol == protocol)
+ trans_free(trans);
+ }
+}
+
/* Chapter 9.2.14 : Send LOCATION UPDATING REJECT */
int gsm0408_loc_upd_rej(struct gsm_subscriber_connection *conn, u_int8_t cause)
{
diff --git a/openbsc/src/mncc_sock.c b/openbsc/src/mncc_sock.c
index be0d9b933..7e0a2088c 100644
--- a/openbsc/src/mncc_sock.c
+++ b/openbsc/src/mncc_sock.c
@@ -66,7 +66,9 @@ static void mncc_sock_close(struct mncc_sock_state *state)
state->listen_bfd.when |= BSC_FD_READ;
/* FIXME: make sure we don't enqueue anymore */
- /* FIXME: release all exisitng calls */
+
+ /* release all exisitng calls */
+ gsm0408_clear_all_trans(state->net, GSM48_PDISC_CC);
/* flush the queue */
while (!llist_empty(&state->net->upqueue)) {