This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Pau Espin Pedrol gerrit-no-reply at lists.osmocom.orgPau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13221
Change subject: Move msc related code from gsm_data to bsc_msc
......................................................................
Move msc related code from gsm_data to bsc_msc
This way ipaccess utils can be built without requiring libosmo-sigtran.
Change-Id: I508188896be58ddc3bd4e9c3c661c258c06866f4
---
M include/osmocom/bsc/bsc_msc_data.h
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/gsm_data.c
M src/osmo-bsc/osmo_bsc_msc.c
M tests/handover/Makefile.am
5 files changed, 19 insertions(+), 19 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/21/13221/1
diff --git a/include/osmocom/bsc/bsc_msc_data.h b/include/osmocom/bsc/bsc_msc_data.h
index 9f2d7d8..5202174 100644
--- a/include/osmocom/bsc/bsc_msc_data.h
+++ b/include/osmocom/bsc/bsc_msc_data.h
@@ -161,6 +161,9 @@
struct bsc_msc_data *osmo_msc_data_find(struct gsm_network *, int);
struct bsc_msc_data *osmo_msc_data_alloc(struct gsm_network *, int);
+
+struct osmo_cell_global_id *cgi_for_msc(struct bsc_msc_data *msc, struct gsm_bts *bts);
+
/* Helper function to calculate the port number for a given
* timeslot/multiplex. This functionality is needed to support
* the sccp-lite scenario where the MGW is handled externally */
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index c4315c0..47ca5e8 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -1687,6 +1687,4 @@
int bts_count_free_ts(struct gsm_bts *bts, enum gsm_phys_chan_config pchan);
-struct osmo_cell_global_id *cgi_for_msc(struct bsc_msc_data *msc, struct gsm_bts *bts);
-
#endif /* _GSM_DATA_H */
diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c
index 0198fcf..a128216 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 @@
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 71931e6..4df1ce4 100644
--- a/src/osmo-bsc/osmo_bsc_msc.c
+++ b/src/osmo-bsc/osmo_bsc_msc.c
@@ -119,3 +119,18 @@
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;
+}
diff --git a/tests/handover/Makefile.am b/tests/handover/Makefile.am
index 5e9af04..5e4440c 100644
--- a/tests/handover/Makefile.am
+++ b/tests/handover/Makefile.am
@@ -69,6 +69,7 @@
$(top_builddir)/src/osmo-bsc/neighbor_ident.o \
$(top_builddir)/src/osmo-bsc/net_init.o \
$(top_builddir)/src/osmo-bsc/osmo_bsc_lcls.o \
+ $(top_builddir)/src/osmo-bsc/osmo_bsc_msc.o \
$(top_builddir)/src/osmo-bsc/paging.o \
$(top_builddir)/src/osmo-bsc/pcu_sock.o \
$(top_builddir)/src/osmo-bsc/penalty_timers.o \
--
To view, visit https://gerrit.osmocom.org/13221
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I508188896be58ddc3bd4e9c3c661c258c06866f4
Gerrit-Change-Number: 13221
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190312/33dd4f1a/attachment.htm>