aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/osmo_msc.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-01-23 10:28:35 +0100
committerHarald Welte <laforge@gnumonks.org>2012-01-23 10:28:35 +0100
commit95e862cab42e41568ba11599aa3e78d92f54bdf8 (patch)
tree55a8fbe9f68e46468f74412de113b2280623c987 /openbsc/src/libmsc/osmo_msc.c
parentd55cef9b07b9a446cca62bb3784395b5e5733e1b (diff)
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.
Diffstat (limited to 'openbsc/src/libmsc/osmo_msc.c')
-rw-r--r--openbsc/src/libmsc/osmo_msc.c21
1 files changed, 21 insertions, 0 deletions
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 <openbsc/bsc_api.h>
#include <openbsc/debug.h>
#include <openbsc/transaction.h>
+#include <openbsc/db.h>
#include <openbsc/gsm_04_11.h>
@@ -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() {