aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-19 15:13:27 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-19 16:01:14 +0800
commit46d9b9447722e2a433b1a7497bff895eb7b2ae84 (patch)
tree339bad028ae1e465ffd91b4f5ef69f28a3e0c278
parent4f705b9f99867ecc8495a9d26ed92eef33af8749 (diff)
[vty] Allow to allocate TCH/H and TCH/F too for testing purposes.
-rw-r--r--openbsc/src/vty_interface.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c
index df643c9c..775ef104 100644
--- a/openbsc/src/vty_interface.c
+++ b/openbsc/src/vty_interface.c
@@ -234,7 +234,7 @@ DEFUN(show_bts, show_bts_cmd, "show bts [number]",
return CMD_SUCCESS;
}
-DEFUN(test_bts_lchan_alloc, test_bts_lchan_alloc_cmd, "test bts alloc sdcch",
+DEFUN(test_bts_lchan_alloc, test_bts_lchan_alloc_cmd, "test bts alloc (sdcch|tch_h|tch_f)",
"Test command to allocate all channels. You will need to restart. To free these channels.\n")
{
struct gsm_network *net = gsmnet;
@@ -242,7 +242,15 @@ DEFUN(test_bts_lchan_alloc, test_bts_lchan_alloc_cmd, "test bts alloc sdcch",
enum gsm_chan_t type = GSM_LCHAN_NONE;
- type = GSM_LCHAN_SDCCH;
+ if (strcmp("sdcch", argv[0]) == 0)
+ type = GSM_LCHAN_SDCCH;
+ else if (strcmp("tch_h", argv[0]) == 0)
+ type = GSM_LCHAN_TCH_H;
+ else if (strcmp("tch_f", argv[0]) == 0)
+ type = GSM_LCHAN_TCH_F;
+ else {
+ vty_out(vty, "Unknown mode for allocation.%s", VTY_NEWLINE);
+ }
for (bts_nr = 0; bts_nr < net->num_bts; ++bts_nr) {
struct gsm_bts *bts = gsm_bts_num(net, bts_nr);