diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2013-12-15 18:32:32 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-05-23 13:03:44 +0200 |
commit | 5981c25bc0372c73137ae04d3c26e8caab3a60fa (patch) | |
tree | 17b1bceb1a8a137860609b1f30e11dffa41ec4e4 /src/host/layer23/src/mobile/vty_interface.c | |
parent | c4b5b2c808abb659b69a6376be8a1e15e8096652 (diff) |
mobile: Use only sel_si for informations about the current cell
sel_si structure tracks content of SI5* and SI6 messages. The informations
will change after handover, so they do not refer to the origin cell.
The list of scanned cells is not affected. The sel_si structure will be
overwritten with the selected cell after leaving dedicated mode.
Change-Id: Idd6a35c13de56115645e0861d95c256ebf9257f8
Diffstat (limited to 'src/host/layer23/src/mobile/vty_interface.c')
-rw-r--r-- | src/host/layer23/src/mobile/vty_interface.c | 7 |
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 9e097cc3..15eb2415 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -329,12 +329,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) { @@ -345,7 +347,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); |