From 95e862cab42e41568ba11599aa3e78d92f54bdf8 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 23 Jan 2012 10:28:35 +0100 Subject: Move processing of CLASSMARK CHANGE behind bsc_api This prevents osmo-bsc from sending RR messages to the MSC and rather process them inside the BSC and turn them into BSSAP CM UPDATE. --- openbsc/src/libmsc/osmo_msc.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'openbsc/src/libmsc/osmo_msc.c') diff --git a/openbsc/src/libmsc/osmo_msc.c b/openbsc/src/libmsc/osmo_msc.c index 154386b13..121de679c 100644 --- a/openbsc/src/libmsc/osmo_msc.c +++ b/openbsc/src/libmsc/osmo_msc.c @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -83,6 +84,25 @@ static void msc_assign_fail(struct gsm_subscriber_connection *conn, "Assignment fail should not have been reached.\n"); } +static void msc_classmark_chg(struct gsm_subscriber_connection *conn, + const uint8_t *cm2, uint8_t cm2_len, + const uint8_t *cm3, uint8_t cm3_len) +{ + struct gsm_subscriber *subscr = conn->subscr; + + if (subscr) { + subscr->equipment.classmark2_len = cm2_len; + memcpy(subscr->equipment.classmark2, cm2, cm2_len); + if (cm3) { + subscr->equipment.classmark3_len = cm3_len; + memcpy(subscr->equipment.classmark3, cm3, cm3_len); + } + db_sync_equipment(&subscr->equipment); + } +} + + + static struct bsc_api msc_handler = { .sapi_n_reject = msc_sapi_n_reject, .compl_l3 = msc_compl_l3, @@ -90,6 +110,7 @@ static struct bsc_api msc_handler = { .clear_request = msc_clear_request, .assign_compl = msc_assign_compl, .assign_fail = msc_assign_fail, + .classmark_chg = msc_classmark_chg, }; struct bsc_api *msc_bsc_api() { -- cgit v1.2.3