[PATCH] osmo-bsc[master]: Remove bogus MM INFO configuration

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Dec 19 17:33:19 UTC 2017


Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/5478

to look at the new patch set (#4).

Remove bogus MM INFO configuration

The network name and other MM INFO is controlled by the MSC, not the BSC.

Change-Id: I1cbf72fc50cff29e7c1633ba752cbf15b4b84c58
---
M doc/examples/osmo-bsc/osmo-bsc-minimal.cfg
M doc/examples/osmo-bsc/osmo-bsc.cfg
M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_ctrl_commands.c
M src/libbsc/bsc_init.c
M src/libbsc/bsc_vty.c
M src/libcommon-cs/common_cs_vty.c
8 files changed, 0 insertions(+), 100 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/78/5478/4

diff --git a/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg b/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg
index c972e06..850e29c 100644
--- a/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg
@@ -1,9 +1,6 @@
 network
  network country code 901
  mobile network code 70
- mm info 1
- short name OsmoBSC
- long name OsmoBSC
  bts 0
   type sysmobts
   band GSM-1800
diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg
index c7ba689..17412f7 100644
--- a/doc/examples/osmo-bsc/osmo-bsc.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc.cfg
@@ -6,12 +6,9 @@
 network
  network country code 1
  mobile network code 1
- short name OsmoBSC
- long name OsmoBSC
  encryption a5 0
  neci 0
  paging any use tch 0
- mm info 0
  handover 0
  handover window rxlev averaging 10
  handover window rxqual averaging 1
diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
index 341aa43..581d541 100644
--- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
@@ -5,12 +5,9 @@
 network
  network country code 1
  mobile network code 1
- short name OsmoBSC
- long name OsmoBSC
  encryption a5 0
  neci 0
  paging any use tch 0
- mm info 0
  handover 0
  handover window rxlev averaging 10
  handover window rxqual averaging 1
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 8e4dc04..7a1b62d 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -278,8 +278,6 @@
 	/* global parameters */
 	uint16_t country_code;
 	uint16_t network_code;
-	char *name_long;
-	char *name_short;
 	int a5_encryption;
 	int neci;
 	int send_mm_info;
diff --git a/src/libbsc/bsc_ctrl_commands.c b/src/libbsc/bsc_ctrl_commands.c
index 2d6fcb6..41d2361 100644
--- a/src/libbsc/bsc_ctrl_commands.c
+++ b/src/libbsc/bsc_ctrl_commands.c
@@ -30,45 +30,8 @@
 #include <osmocom/bsc/osmo_bsc_rf.h>
 #include <osmocom/bsc/bsc_msc_data.h>
 
-#define CTRL_CMD_VTY_STRING(cmdname, cmdstr, dtype, element) \
-	CTRL_HELPER_GET_STRING(cmdname, dtype, element) \
-	CTRL_HELPER_SET_STRING(cmdname, dtype, element) \
-static struct ctrl_cmd_element cmd_##cmdname = { \
-	.name = cmdstr, \
-	.get = get_##cmdname, \
-	.set = set_##cmdname, \
-	.verify = verify_vty_description_string, \
-}
-
-/**
- * Check that there are no newlines or comments or other things
- * that could make the VTY configuration unparsable.
- */
-static int verify_vty_description_string(struct ctrl_cmd *cmd,
-			const char *value, void *data)
-{
-	int i;
-	const size_t len = strlen(value);
-
-	for (i = 0; i < len; ++i) {
-		switch(value[i]) {
-		case '#':
-		case '\n':
-		case '\r':
-			cmd->reply = "String includes illegal character";
-			return -1;
-		default:
-			break;
-		}
-	}
-
-	return 0;
-}
-
 CTRL_CMD_DEFINE_RANGE(net_mnc, "mnc", struct gsm_network, network_code, 0, 999);
 CTRL_CMD_DEFINE_RANGE(net_mcc, "mcc", struct gsm_network, country_code, 1, 999);
-CTRL_CMD_VTY_STRING(net_short_name, "short-name", struct gsm_network, name_short);
-CTRL_CMD_VTY_STRING(net_long_name, "long-name", struct gsm_network, name_long);
 
 static int set_net_apply_config(struct ctrl_cmd *cmd, void *data)
 {
@@ -452,8 +415,6 @@
 	int rc = 0;
 	rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mnc);
 	rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc);
-	rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_short_name);
-	rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_long_name);
 	rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_apply_config);
 	rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc_mnc_apply);
 	rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_rf_lock);
diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c
index 34dfd36..c5a75aa 100644
--- a/src/libbsc/bsc_init.c
+++ b/src/libbsc/bsc_init.c
@@ -536,9 +536,6 @@
 	if (!bsc_gsmnet)
 		return -ENOMEM;
 
-	bsc_gsmnet->name_long = talloc_strdup(bsc_gsmnet, "OpenBSC");
-	bsc_gsmnet->name_short = talloc_strdup(bsc_gsmnet, "OpenBSC");
-
 	return 0;
 }
 
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index a73c6a4..7612eda 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -167,18 +167,12 @@
 	vty_out(vty, "BSC is on Country Code %u, Network Code %u "
 		"and has %u BTS%s", net->country_code, net->network_code,
 		net->num_bts, VTY_NEWLINE);
-	vty_out(vty, "  Long network name: '%s'%s",
-		net->name_long, VTY_NEWLINE);
-	vty_out(vty, "  Short network name: '%s'%s",
-		net->name_short, VTY_NEWLINE);
 	vty_out(vty, "%s", VTY_NEWLINE);
 	vty_out(vty, "  Encryption: A5/%u%s", net->a5_encryption,
 		VTY_NEWLINE);
 	vty_out(vty, "  NECI (TCH/H): %u%s", net->neci,
 		VTY_NEWLINE);
 	vty_out(vty, "  Use TCH for Paging any: %d%s", net->pag_any_tch,
-		VTY_NEWLINE);
-	vty_out(vty, "  MM Info: %s%s", net->send_mm_info ? "On" : "Off",
 		VTY_NEWLINE);
 	vty_out(vty, "  Handover: %s%s", net->handover.active ? "On" : "Off",
 		VTY_NEWLINE);
@@ -806,12 +800,9 @@
 	vty_out(vty, "network%s", VTY_NEWLINE);
 	vty_out(vty, " network country code %u%s", gsmnet->country_code, VTY_NEWLINE);
 	vty_out(vty, " mobile network code %u%s", gsmnet->network_code, VTY_NEWLINE);
-	vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE);
-	vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE);
 	vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE);
 	vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE);
 	vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, VTY_NEWLINE);
-	vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE);
 	vty_out(vty, " handover %u%s", gsmnet->handover.active, VTY_NEWLINE);
 	vty_out(vty, " handover window rxlev averaging %u%s",
 		gsmnet->handover.win_rxlev_avg, VTY_NEWLINE);
diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c
index 2732ebf..35c13dd 100644
--- a/src/libcommon-cs/common_cs_vty.c
+++ b/src/libcommon-cs/common_cs_vty.c
@@ -80,28 +80,6 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_net_name_short,
-      cfg_net_name_short_cmd,
-      "short name NAME",
-      "Set the short GSM network name\n" NAME_CMD_STR NAME_STR)
-{
-	struct gsm_network *gsmnet = gsmnet_from_vty(vty);
-
-	osmo_talloc_replace_string(gsmnet, &gsmnet->name_short, argv[0]);
-	return CMD_SUCCESS;
-}
-
-DEFUN(cfg_net_name_long,
-      cfg_net_name_long_cmd,
-      "long name NAME",
-      "Set the long GSM network name\n" NAME_CMD_STR NAME_STR)
-{
-	struct gsm_network *gsmnet = gsmnet_from_vty(vty);
-
-	osmo_talloc_replace_string(gsmnet, &gsmnet->name_long, argv[0]);
-	return CMD_SUCCESS;
-}
-
 DEFUN(cfg_net_encryption,
       cfg_net_encryption_cmd,
       "encryption a5 (0|1|2|3)",
@@ -113,19 +91,6 @@
 	struct gsm_network *gsmnet = gsmnet_from_vty(vty);
 
 	gsmnet->a5_encryption = atoi(argv[0]);
-
-	return CMD_SUCCESS;
-}
-
-DEFUN(cfg_net_mm_info, cfg_net_mm_info_cmd,
-      "mm info (0|1)",
-	"Mobility Management\n"
-	"Send MM INFO after LOC UPD ACCEPT\n"
-	"Disable\n" "Enable\n")
-{
-	struct gsm_network *gsmnet = gsmnet_from_vty(vty);
-
-	gsmnet->send_mm_info = atoi(argv[0]);
 
 	return CMD_SUCCESS;
 }
@@ -246,10 +211,7 @@
 	install_node(&net_node, config_write_net);
 	install_element(GSMNET_NODE, &cfg_net_ncc_cmd);
 	install_element(GSMNET_NODE, &cfg_net_mnc_cmd);
-	install_element(GSMNET_NODE, &cfg_net_name_short_cmd);
-	install_element(GSMNET_NODE, &cfg_net_name_long_cmd);
 	install_element(GSMNET_NODE, &cfg_net_encryption_cmd);
-	install_element(GSMNET_NODE, &cfg_net_mm_info_cmd);
 	install_element(GSMNET_NODE, &cfg_net_timezone_cmd);
 	install_element(GSMNET_NODE, &cfg_net_timezone_dst_cmd);
 	install_element(GSMNET_NODE, &cfg_net_no_timezone_cmd);

-- 
To view, visit https://gerrit.osmocom.org/5478
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I1cbf72fc50cff29e7c1633ba752cbf15b4b84c58
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list