aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_vty.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-04-30 17:55:16 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-04 09:58:34 +0200
commit2acfbebfd3b7fc24ccaf2115e7c8d55e94cd1450 (patch)
treeede55f9a1845652ddecea03c1923861f7af23224 /src/pcu_vty.c
parentc0c580c414e4fe0bd82ebc78ff12bb1014cd5a9c (diff)
vty: Fix value range of commands accepting csecs
Currently an uint8_t csec variable is used to temporarily store the number of centiseconds which can be set within the range 1 - 65535. This way values above 255 cannot be set properly. This affects the VTY commands "queue lifetime", "queue hysteres", and "queue idle-ack-delay". This commit replaces the uint8_t by an uint16_t. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/pcu_vty.c')
-rw-r--r--src/pcu_vty.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index af1e5615..a8fdaa93 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -152,7 +152,7 @@ DEFUN(cfg_pcu_queue_lifetime,
QUEUE_STR LIFETIME_STR "Lifetime in centi-seconds")
{
struct gprs_rlcmac_bts *bts = bts_main_data();
- uint8_t csec = atoi(argv[0]);
+ uint16_t csec = atoi(argv[0]);
bts->force_llc_lifetime = csec;
@@ -193,7 +193,7 @@ DEFUN(cfg_pcu_queue_hysteresis,
QUEUE_STR QUEUE_HYSTERESIS_STR "Hysteresis in centi-seconds")
{
struct gprs_rlcmac_bts *bts = bts_main_data();
- uint8_t csec = atoi(argv[0]);
+ uint16_t csec = atoi(argv[0]);
bts->llc_discard_csec = csec;
@@ -220,7 +220,7 @@ DEFUN(cfg_pcu_queue_idle_ack_delay,
QUEUE_STR QUEUE_IDLE_ACK_STR "Idle ACK delay in centi-seconds")
{
struct gprs_rlcmac_bts *bts = bts_main_data();
- uint8_t csec = atoi(argv[0]);
+ uint16_t csec = atoi(argv[0]);
bts->llc_idle_ack_csec = csec;