aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-04-07 13:11:50 +0200
committerHarald Welte <laforge@gnumonks.org>2015-09-22 16:41:28 +0200
commitc2ee307fd42975b63317e9d4944e5822286cc69b (patch)
tree06df1d17adaeb2261ebb34b8c3234d754d8f2f79 /src/common
parent2e4a26a0e942e227a96819271ea0ea2b03566928 (diff)
Allow one or more TRX to configure via VTY
Diffstat (limited to 'src/common')
-rw-r--r--src/common/vty.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/vty.c b/src/common/vty.c
index e3fd57df..bca839bb 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -140,8 +140,9 @@ static struct cmd_node trx_node = {
1,
};
+static char cfg_bts_trx_cmd_string[16];
DEFUN(cfg_bts_trx, cfg_bts_trx_cmd,
- "trx <0-0>",
+ cfg_bts_trx_cmd_string,
"Select a TRX to configure\n" "TRX number\n")
{
int trx_nr = atoi(argv[0]);
@@ -762,7 +763,7 @@ DEFUN(no_bts_t_t_l_loopback,
return CMD_SUCCESS;
}
-int bts_vty_init(struct gsm_bts *bts, const struct log_info *cat)
+int bts_vty_init(struct gsm_bts *bts, int trx_num, const struct log_info *cat)
{
cfg_trx_gsmtap_sapi_cmd.string = vty_cmd_string_from_valstr(bts, gsmtap_sapi_names,
"gsmtap-sapi (",
@@ -802,6 +803,7 @@ int bts_vty_init(struct gsm_bts *bts, const struct log_info *cat)
install_element(BTS_NODE, &cfg_trx_no_gsmtap_sapi_cmd);
/* add and link to TRX config node */
+ sprintf(cfg_bts_trx_cmd_string, "trx <0-%d>", trx_num - 1);
install_element(BTS_NODE, &cfg_bts_trx_cmd);
install_node(&trx_node, config_write_dummy);
install_default(TRX_NODE);