summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src/mobile/vty_interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/host/layer23/src/mobile/vty_interface.c')
-rw-r--r--src/host/layer23/src/mobile/vty_interface.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c
index 6a93cec2..b1ee65b5 100644
--- a/src/host/layer23/src/mobile/vty_interface.c
+++ b/src/host/layer23/src/mobile/vty_interface.c
@@ -335,12 +335,14 @@ DEFUN(show_cell_si, show_cell_si_cmd, "show cell MS_NAME <0-1023> [pcs]",
"Given frequency is PCS band (1900) rather than DCS band.")
{
struct osmocom_ms *ms;
+ struct gsm322_cellsel *cs;
struct gsm48_sysinfo *s;
uint16_t arfcn = atoi(argv[1]);
ms = get_ms(argv[0], vty);
if (!ms)
return CMD_WARNING;
+ cs = &ms->cellsel;
if (argc > 2) {
if (arfcn < 512 || arfcn > 810) {
@@ -351,7 +353,10 @@ DEFUN(show_cell_si, show_cell_si_cmd, "show cell MS_NAME <0-1023> [pcs]",
arfcn |= ARFCN_PCS;
}
- s = ms->cellsel.list[arfcn2index(arfcn)].sysinfo;
+ if (cs->selected && cs->sel_arfcn == arfcn)
+ s = &cs->sel_si;
+ else
+ s = cs->list[arfcn2index(arfcn)].sysinfo;
if (!s) {
vty_out(vty, "Given ARFCN '%s' has no sysinfo available%s",
argv[1], VTY_NEWLINE);