aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-04-01 13:59:05 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-04-01 13:59:05 +0200
commit5047390eefae72d50cfc4cf821a70eba9d55d255 (patch)
treed5c5ec15b9d4cf02c34ea5cc4f5a89557738e875
parent9c20a5f45c49562ab7e3e53b5abb94e2afdfb23f (diff)
bts: Take all parameters even if they are not applied yet
For the case of GPRS off and then later switched on we need to remember the parameters and the only way we can do it, is to store them all the time. Related: SYS#591
-rw-r--r--openbsc/src/libbsc/bsc_vty.c40
1 files changed, 10 insertions, 30 deletions
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index 588be267f..542b8c0ee 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -2266,10 +2266,8 @@ DEFUN(cfg_bts_prs_bvci, cfg_bts_gprs_bvci_cmd,
{
struct gsm_bts *bts = vty->index;
- if (bts->gprs.mode == BTS_GPRS_NONE) {
+ if (bts->gprs.mode == BTS_GPRS_NONE)
vty_out(vty, "%% GPRS not enabled on this BTS%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
bts->gprs.cell.bvci = atoi(argv[0]);
@@ -2284,10 +2282,8 @@ DEFUN(cfg_bts_gprs_nsei, cfg_bts_gprs_nsei_cmd,
{
struct gsm_bts *bts = vty->index;
- if (bts->gprs.mode == BTS_GPRS_NONE) {
+ if (bts->gprs.mode == BTS_GPRS_NONE)
vty_out(vty, "%% GPRS not enabled on this BTS%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
bts->gprs.nse.nsei = atoi(argv[0]);
@@ -2306,10 +2302,8 @@ DEFUN(cfg_bts_gprs_nsvci, cfg_bts_gprs_nsvci_cmd,
struct gsm_bts *bts = vty->index;
int idx = atoi(argv[0]);
- if (bts->gprs.mode == BTS_GPRS_NONE) {
+ if (bts->gprs.mode == BTS_GPRS_NONE)
vty_out(vty, "%% GPRS not enabled on this BTS%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
bts->gprs.nsvc[idx].nsvci = atoi(argv[1]);
@@ -2327,10 +2321,8 @@ DEFUN(cfg_bts_gprs_nsvc_lport, cfg_bts_gprs_nsvc_lport_cmd,
struct gsm_bts *bts = vty->index;
int idx = atoi(argv[0]);
- if (bts->gprs.mode == BTS_GPRS_NONE) {
+ if (bts->gprs.mode == BTS_GPRS_NONE)
vty_out(vty, "%% GPRS not enabled on this BTS%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
bts->gprs.nsvc[idx].local_port = atoi(argv[1]);
@@ -2348,10 +2340,8 @@ DEFUN(cfg_bts_gprs_nsvc_rport, cfg_bts_gprs_nsvc_rport_cmd,
struct gsm_bts *bts = vty->index;
int idx = atoi(argv[0]);
- if (bts->gprs.mode == BTS_GPRS_NONE) {
+ if (bts->gprs.mode == BTS_GPRS_NONE)
vty_out(vty, "%% GPRS not enabled on this BTS%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
bts->gprs.nsvc[idx].remote_port = atoi(argv[1]);
@@ -2369,10 +2359,8 @@ DEFUN(cfg_bts_gprs_nsvc_rip, cfg_bts_gprs_nsvc_rip_cmd,
int idx = atoi(argv[0]);
struct in_addr ia;
- if (bts->gprs.mode == BTS_GPRS_NONE) {
+ if (bts->gprs.mode == BTS_GPRS_NONE)
vty_out(vty, "%% GPRS not enabled on this BTS%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
inet_aton(argv[1], &ia);
bts->gprs.nsvc[idx].remote_ip = ntohl(ia.s_addr);
@@ -2402,10 +2390,8 @@ DEFUN(cfg_bts_gprs_ns_timer, cfg_bts_gprs_ns_timer_cmd,
int idx = get_string_value(gprs_ns_timer_strs, argv[0]);
int val = atoi(argv[1]);
- if (bts->gprs.mode == BTS_GPRS_NONE) {
+ if (bts->gprs.mode == BTS_GPRS_NONE)
vty_out(vty, "%% GPRS not enabled on this BTS%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
if (idx < 0 || idx >= ARRAY_SIZE(bts->gprs.nse.timer))
return CMD_WARNING;
@@ -2439,10 +2425,8 @@ DEFUN(cfg_bts_gprs_cell_timer, cfg_bts_gprs_cell_timer_cmd,
int idx = get_string_value(gprs_bssgp_cfg_strs, argv[0]);
int val = atoi(argv[1]);
- if (bts->gprs.mode == BTS_GPRS_NONE) {
+ if (bts->gprs.mode == BTS_GPRS_NONE)
vty_out(vty, "%% GPRS not enabled on this BTS%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
if (idx < 0 || idx >= ARRAY_SIZE(bts->gprs.cell.timer))
return CMD_WARNING;
@@ -2461,10 +2445,8 @@ DEFUN(cfg_bts_gprs_rac, cfg_bts_gprs_rac_cmd,
{
struct gsm_bts *bts = vty->index;
- if (bts->gprs.mode == BTS_GPRS_NONE) {
+ if (bts->gprs.mode == BTS_GPRS_NONE)
vty_out(vty, "%% GPRS not enabled on this BTS%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
bts->gprs.rac = atoi(argv[0]);
@@ -2481,10 +2463,8 @@ DEFUN(cfg_bts_gprs_net_ctrl_ord, cfg_bts_gprs_net_ctrl_ord_cmd,
{
struct gsm_bts *bts = vty->index;
- if (bts->gprs.mode == BTS_GPRS_NONE) {
+ if (bts->gprs.mode == BTS_GPRS_NONE)
vty_out(vty, "%% GPRS not enabled on this BTS%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
bts->gprs.net_ctrl_ord = atoi(argv[0] + 2);