aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc/osmo_bsc_bssap.c
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-06-12 19:09:43 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-06-18 17:50:09 +0200
commit51d2a33542064e8605302a22214f57f7886c703e (patch)
tree3633bf3b80b26c130e613cd921474380966407f5 /openbsc/src/osmo-bsc/osmo_bsc_bssap.c
parent738cc1106c0273a918350f495a6a746d06fc2e2a (diff)
osmo-bsc: react on reset requests from MSC
The bsc side currently can not receive reset commands from an MSC. This patch adds required functionality to receive a reset command and acknowlege it properly. The effects are the same as with when sending resets (all drop all ongoing calls and sccp connections)
Diffstat (limited to 'openbsc/src/osmo-bsc/osmo_bsc_bssap.c')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_bssap.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c
index f08811498..afa81b0e5 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c
@@ -203,6 +203,24 @@ static int bssmap_handle_reset_ack(struct bsc_msc_data *msc,
return 0;
}
+/* Handle MSC sided reset */
+static int bssmap_handle_reset(struct bsc_msc_data *msc,
+ struct msgb *msg, unsigned int length)
+{
+ LOGP(DMSC, LOGL_NOTICE, "Reset from MSC No.: %i\n", msc->nr);
+
+ /* Instruct the bsc to close all open sigtran connections and to
+ * close all active channels on the BTS side as well */
+ osmo_bsc_sigtran_reset(msc);
+
+ /* Inform the MSC that we have received the reset request and
+ * that we acted accordingly */
+ osmo_bsc_sigtran_tx_reset_ack(msc);
+
+ return 0;
+}
+
+
/* GSM 08.08 ยง 3.2.1.19 */
static int bssmap_handle_paging(struct bsc_msc_data *msc,
struct msgb *msg, unsigned int payload_length)
@@ -553,6 +571,9 @@ static int bssmap_rcvmsg_udt(struct bsc_msc_data *msc,
case BSS_MAP_MSG_RESET_ACKNOWLEDGE:
ret = bssmap_handle_reset_ack(msc, msg, length);
break;
+ case BSS_MAP_MSG_RESET:
+ ret = bssmap_handle_reset(msc, msg, length);
+ break;
case BSS_MAP_MSG_PAGING:
ret = bssmap_handle_paging(msc, msg, length);
break;