aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/osmo_msc.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-12-27 12:31:02 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-12-27 12:55:44 +0100
commit40aac3f7f6d30f90f192b9e88c71f81b09c27840 (patch)
tree7724da8b6a1022ff599887af600208156f70bb9c /openbsc/src/libmsc/osmo_msc.c
parent3365cd1cfe110e5ce3d7c65022b9b3c8c27f3e4c (diff)
bsc: Assume assignment_complete/assignment_fail is set
The osmo-nitb application sometimes crashes because the BSC API is doing an assignment underneath which is not handled by the code, add dumy handlers to not crash, the right thing to do is to change MNCC to have an assignment that can succeed/fail. The keyword to look for is MNCC_LCHAN_MODIFY and mncc_sock should wait for an ack/nack but right now the call just continues.
Diffstat (limited to 'openbsc/src/libmsc/osmo_msc.c')
-rw-r--r--openbsc/src/libmsc/osmo_msc.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/openbsc/src/libmsc/osmo_msc.c b/openbsc/src/libmsc/osmo_msc.c
index 8c86dcc8e..154386b13 100644
--- a/openbsc/src/libmsc/osmo_msc.c
+++ b/openbsc/src/libmsc/osmo_msc.c
@@ -60,11 +60,36 @@ static void msc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, st
gsm0408_dispatch(conn, msg);
}
+static void msc_assign_compl(struct gsm_subscriber_connection *conn,
+ uint8_t rr_cause, uint8_t chosen_channel,
+ uint8_t encr_alg_id, uint8_t speec)
+{
+ /*
+ * The mncc code is not doing assignment requests and
+ * we should not end here. See MNCC_LCHAN_MODIFY
+ */
+ LOGP(DMSC, LOGL_ERROR,
+ "Assignment complete should not have been reached.\n");
+}
+
+static void msc_assign_fail(struct gsm_subscriber_connection *conn,
+ uint8_t cause, uint8_t *rr_cause)
+{
+ /*
+ * The mncc code is not doing assignment requests and
+ * we should not end here. See MNCC_LCHAN_MODIFY
+ */
+ LOGP(DMSC, LOGL_ERROR,
+ "Assignment fail should not have been reached.\n");
+}
+
static struct bsc_api msc_handler = {
.sapi_n_reject = msc_sapi_n_reject,
- .clear_request = msc_clear_request,
.compl_l3 = msc_compl_l3,
.dtap = msc_dtap,
+ .clear_request = msc_clear_request,
+ .assign_compl = msc_assign_compl,
+ .assign_fail = msc_assign_fail,
};
struct bsc_api *msc_bsc_api() {