aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-07-07 13:47:50 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-07-25 15:14:15 +0200
commitb67fb4fc63def9acc6eaf69c13841890703b1d45 (patch)
treed5c8a17c2c69f61a9e49651324ac305b9ae9e93a /src
parent4b36c7a34e461d073a4685358e64f1fb945566ae (diff)
a_iface: fix missing clear command
When a subscriber connection is freed on the MSC side (the conversion is over) the MSC should send a clear command to the BSC in order to inform the BSC that the connection is over. Currently this step is missing. Instead we wait for the BSC to issue a clear request. This is not as it should be, connections should be actively cleared by the MSC. Add the missing clear command
Diffstat (limited to 'src')
-rw-r--r--src/libmsc/a_iface.c11
-rw-r--r--src/libmsc/osmo_msc.c2
2 files changed, 13 insertions, 0 deletions
diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c
index 2a28803dd..b16936f50 100644
--- a/src/libmsc/a_iface.c
+++ b/src/libmsc/a_iface.c
@@ -405,6 +405,17 @@ int a_iface_tx_assignment(const struct gsm_trans *trans)
return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg);
}
+/* Send clear command via A-interface */
+int a_iface_tx_clear_cmd(struct gsm_subscriber_connection *conn)
+{
+ struct msgb *msg;
+
+ LOGP(DMSC, LOGL_NOTICE, "Sendig clear command to BSC (conn_id=%u)\n", conn->a.conn_id);
+
+ msg = gsm0808_create_clear_command(GSM0808_CAUSE_CALL_CONTROL);
+ return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg);
+}
+
/* Callback function: Close all open connections */
static void a_reset_cb(const void *priv)
{
diff --git a/src/libmsc/osmo_msc.c b/src/libmsc/osmo_msc.c
index 3eedd8257..db6a6ca72 100644
--- a/src/libmsc/osmo_msc.c
+++ b/src/libmsc/osmo_msc.c
@@ -29,6 +29,7 @@
#include <openbsc/vlr.h>
#include <openbsc/osmo_msc.h>
#include <openbsc/iu.h>
+#include <openbsc/a_iface.h>
#include <openbsc/gsm_04_11.h>
@@ -219,6 +220,7 @@ void msc_subscr_con_cleanup(struct gsm_subscriber_connection *conn)
return;
if (conn->vsub) {
+ a_iface_tx_clear_cmd(conn);
DEBUGP(DRLL, "subscr %s: Freeing subscriber connection\n",
vlr_subscr_name(conn->vsub));
msc_subscr_cleanup(conn->vsub);