summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-07-13 11:06:10 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-07-13 11:06:10 +0200
commit1e365477ee5e4dc708b94474b4e094ea3c21d95b (patch)
tree4342f2d59de9c982598b214613dc15dd520856bb
parent14a434b9d660cb92382f418739b8329b44640496 (diff)
bsc: Rename core_ncc to core_mnc
Struct osmo_msc_data contains int core_ncc, which is actually the MNC part of the PLMN, not to be confused with the Network Colour Code. The following patch renames this field for clarity and consistency with the standards.
-rw-r--r--openbsc/include/openbsc/osmo_msc_data.h2
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_api.c4
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_filter.c2
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_msc.c2
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_vty.c8
5 files changed, 9 insertions, 9 deletions
diff --git a/openbsc/include/openbsc/osmo_msc_data.h b/openbsc/include/openbsc/osmo_msc_data.h
index ed38187..a5a3f14 100644
--- a/openbsc/include/openbsc/osmo_msc_data.h
+++ b/openbsc/include/openbsc/osmo_msc_data.h
@@ -68,7 +68,7 @@ struct osmo_msc_data {
struct osmo_timer_list pong_timer;
int advanced_ping;
struct bsc_msc_connection *msc_con;
- int core_ncc;
+ int core_mnc;
int core_mcc;
int core_lac;
int core_ci;
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_api.c b/openbsc/src/osmo-bsc/osmo_bsc_api.c
index 5a01d6b..00a10b3 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_api.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_api.c
@@ -53,8 +53,8 @@ static int complete_layer3(struct gsm_subscriber_connection *conn,
static uint16_t get_network_code_for_msc(struct osmo_msc_data *msc)
{
- if (msc->core_ncc != -1)
- return msc->core_ncc;
+ if (msc->core_mnc != -1)
+ return msc->core_mnc;
return msc->network->network_code;
}
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_filter.c b/openbsc/src/osmo-bsc/osmo_bsc_filter.c
index 58a57cd..6058d7e 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_filter.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_filter.c
@@ -313,7 +313,7 @@ static int bsc_patch_mm_info(struct gsm_subscriber_connection *conn,
static int has_core_identity(struct osmo_msc_data *msc)
{
- if (msc->core_ncc != -1)
+ if (msc->core_mnc != -1)
return 1;
if (msc->core_mcc != -1)
return 1;
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_msc.c b/openbsc/src/osmo-bsc/osmo_bsc_msc.c
index 773ee14..0eb3fa9 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_msc.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_msc.c
@@ -572,7 +572,7 @@ struct osmo_msc_data *osmo_msc_data_alloc(struct gsm_network *net, int nr)
INIT_LLIST_HEAD(&msc_data->dests);
msc_data->ping_timeout = 20;
msc_data->pong_timeout = 5;
- msc_data->core_ncc = -1;
+ msc_data->core_mnc = -1;
msc_data->core_mcc = -1;
msc_data->core_ci = -1;
msc_data->core_lac = -1;
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_vty.c b/openbsc/src/osmo-bsc/osmo_bsc_vty.c
index 9a17cd0..8103ffc 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_vty.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_vty.c
@@ -110,9 +110,9 @@ static void write_msc(struct vty *vty, struct osmo_msc_data *msc)
if (msc->bsc_key_present)
vty_out(vty, " auth-key %s%s",
osmo_hexdump(msc->bsc_key, sizeof(msc->bsc_key)), VTY_NEWLINE);
- if (msc->core_ncc != -1)
+ if (msc->core_mnc != -1)
vty_out(vty, " core-mobile-network-code %d%s",
- msc->core_ncc, VTY_NEWLINE);
+ msc->core_mnc, VTY_NEWLINE);
if (msc->core_mcc != -1)
vty_out(vty, " core-mobile-country-code %d%s",
msc->core_mcc, VTY_NEWLINE);
@@ -261,10 +261,10 @@ DEFUN(cfg_net_no_bsc_key, cfg_net_bsc_no_key_cmd,
DEFUN(cfg_net_bsc_ncc,
cfg_net_bsc_ncc_cmd,
"core-mobile-network-code <1-999>",
- "Use this network code for the core network\n" "NCC value\n")
+ "Use this network code for the core network\n" "MNC value\n")
{
struct osmo_msc_data *data = osmo_msc_data(vty);
- data->core_ncc = atoi(argv[0]);
+ data->core_mnc = atoi(argv[0]);
return CMD_SUCCESS;
}