aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-03-12 18:55:57 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2019-03-14 17:07:45 +0100
commita115052e4f354a48b9e3c7d74b08b45657eda3d8 (patch)
tree8ec54ea84d5524ac4643ddcaef3eb2a298e8d344 /src/osmo-bsc
parent2cfd000da32464f62d568f96bac38dedfa4dac1d (diff)
Move msc related code from gsm_data to bsc_msc
This way ipaccess utils can be built without requiring libosmo-sigtran. Change-Id: I508188896be58ddc3bd4e9c3c661c258c06866f4
Diffstat (limited to 'src/osmo-bsc')
-rw-r--r--src/osmo-bsc/gsm_data.c17
-rw-r--r--src/osmo-bsc/osmo_bsc_msc.c15
2 files changed, 15 insertions, 17 deletions
diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c
index 0198fcfe1..a12821699 100644
--- a/src/osmo-bsc/gsm_data.c
+++ b/src/osmo-bsc/gsm_data.c
@@ -38,7 +38,6 @@
#include <osmocom/bsc/gsm_data.h>
#include <osmocom/bsc/osmo_bsc_lcls.h>
-#include <osmocom/bsc/bsc_msc_data.h>
#include <osmocom/bsc/abis_nm.h>
#include <osmocom/bsc/handover_cfg.h>
#include <osmocom/bsc/gsm_timers.h>
@@ -1694,19 +1693,3 @@ const struct value_string lchan_activate_mode_names[] = {
OSMO_VALUE_STRING(FOR_VTY),
{}
};
-
-struct osmo_cell_global_id *cgi_for_msc(struct bsc_msc_data *msc, struct gsm_bts *bts)
-{
- static struct osmo_cell_global_id cgi;
- cgi.lai.plmn = msc->network->plmn;
- if (msc->core_plmn.mcc != GSM_MCC_MNC_INVALID)
- cgi.lai.plmn.mcc = msc->core_plmn.mcc;
- if (msc->core_plmn.mnc != GSM_MCC_MNC_INVALID) {
- cgi.lai.plmn.mnc = msc->core_plmn.mnc;
- cgi.lai.plmn.mnc_3_digits = msc->core_plmn.mnc_3_digits;
- }
- cgi.lai.lac = (msc->core_lac != -1) ? msc->core_lac : bts->location_area_code;
- cgi.cell_identity = (msc->core_ci != -1) ? msc->core_ci : bts->cell_identity;
-
- return &cgi;
-}
diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c
index 71931e615..4df1ce4f8 100644
--- a/src/osmo-bsc/osmo_bsc_msc.c
+++ b/src/osmo-bsc/osmo_bsc_msc.c
@@ -119,3 +119,18 @@ struct bsc_msc_data *osmo_msc_data_alloc(struct gsm_network *net, int nr)
return msc_data;
}
+struct osmo_cell_global_id *cgi_for_msc(struct bsc_msc_data *msc, struct gsm_bts *bts)
+{
+ static struct osmo_cell_global_id cgi;
+ cgi.lai.plmn = msc->network->plmn;
+ if (msc->core_plmn.mcc != GSM_MCC_MNC_INVALID)
+ cgi.lai.plmn.mcc = msc->core_plmn.mcc;
+ if (msc->core_plmn.mnc != GSM_MCC_MNC_INVALID) {
+ cgi.lai.plmn.mnc = msc->core_plmn.mnc;
+ cgi.lai.plmn.mnc_3_digits = msc->core_plmn.mnc_3_digits;
+ }
+ cgi.lai.lac = (msc->core_lac != -1) ? msc->core_lac : bts->location_area_code;
+ cgi.cell_identity = (msc->core_ci != -1) ? msc->core_ci : bts->cell_identity;
+
+ return &cgi;
+}