aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2009-09-29 14:02:33 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2009-09-30 05:49:26 +0200
commit0b7f4b36be4e560a4dbb5f67a2257aa30602b4ee (patch)
treea963ff9dd523e13ae755c7c374c5a6ae55069762 /openbsc
parent1e35cec031dd07fa30e67dd697cb2011f55603ba (diff)
[lac] The lac must be 16 bit. Change it in gsm_bts and vty parsing
The LAC can be 16bit of size. the generation of the LAI, struct gsm_subsriber and the BSC<->MSC was already using it as a 16bit (short) value. Change struct gsm_bts to parse 16bit and change the vty configuration parsing code to deal with a short too.
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/include/openbsc/gsm_data.h2
-rw-r--r--openbsc/src/vty_interface.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index 918f30715..495f74119 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -301,7 +301,7 @@ struct gsm_bts {
/* Cell Identity */
u_int16_t cell_identity;
/* location area code of this BTS */
- u_int8_t location_area_code;
+ u_int16_t location_area_code;
/* Training Sequence Code */
u_int8_t tsc;
/* Base Station Identification Code (BSIC) */
diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c
index b6a9deaba..79124d934 100644
--- a/openbsc/src/vty_interface.c
+++ b/openbsc/src/vty_interface.c
@@ -861,14 +861,14 @@ DEFUN(cfg_bts_ci,
DEFUN(cfg_bts_lac,
cfg_bts_lac_cmd,
- "location_area_code <0-255>",
+ "location_area_code <0-65535>",
"Set the Location Area Code (LAC) of this BTS\n")
{
struct gsm_bts *bts = vty->index;
int lac = atoi(argv[0]);
- if (lac < 0 || lac > 0xff) {
- vty_out(vty, "%% LAC %d is not in the valid range (0-255)%s",
+ if (lac < 0 || lac > 0xffff) {
+ vty_out(vty, "%% LAC %d is not in the valid range (0-65535)%s",
lac, VTY_NEWLINE);
return CMD_WARNING;
}