The output is terminated by a '\n' instead of VTY_NEWLINE.
This is fixed by the commit.
Sponsored-by: On-Waves ehf --- src/gb/gprs_bssgp_vty.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/gb/gprs_bssgp_vty.c b/src/gb/gprs_bssgp_vty.c index 88ae49f..080867b 100644 --- a/src/gb/gprs_bssgp_vty.c +++ b/src/gb/gprs_bssgp_vty.c @@ -97,9 +97,10 @@ static void dump_bvc(struct vty *vty, struct bssgp_bvc_ctx *bvc, int stats) if (fc) vty_out(vty, "FC-BVC(bucket_max: %uoct, leak_rate: " "%uoct/s, cur_tokens: %uoct, max_q_d: %u, " - "cur_q_d: %u)\n", fc->bucket_size_max, + "cur_q_d: %u)%s", fc->bucket_size_max, fc->bucket_leak_rate, fc->bucket_counter, - fc->max_queue_depth, fc->queue_depth); + fc->max_queue_depth, fc->queue_depth, + VTY_NEWLINE); } }
Currently all 2 byte IE of the message are transmitted in the little endian byte ordering.
This commit adds htons to the encoding expressions.
Sponsored-by: On-Waves ehf --- src/gb/gprs_bssgp_bss.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/gb/gprs_bssgp_bss.c b/src/gb/gprs_bssgp_bss.c index c22a17a..5731959 100644 --- a/src/gb/gprs_bssgp_bss.c +++ b/src/gb/gprs_bssgp_bss.c @@ -325,19 +325,19 @@ int bssgp_tx_fc_bvc(struct bssgp_bvc_ctx *bctx, uint8_t tag,
if ((bucket_size / 100) > 0xffff) return -EINVAL; - e_bucket_size = bucket_size / 100; + e_bucket_size = htons(bucket_size / 100);
if ((bucket_leak_rate * 8 / 100) > 0xffff) return -EINVAL; - e_leak_rate = (bucket_leak_rate * 8) / 100; + e_leak_rate = htons((bucket_leak_rate * 8) / 100);
if ((bmax_default_ms / 100) > 0xffff) return -EINVAL; - e_bmax_default_ms = bmax_default_ms / 100; + e_bmax_default_ms = htons(bmax_default_ms / 100);
if ((r_default_ms * 8 / 100) > 0xffff) return -EINVAL; - e_r_default_ms = (r_default_ms * 8) / 100; + e_r_default_ms = htons((r_default_ms * 8) / 100);
if (queue_delay_ms) { if ((*queue_delay_ms / 10) > 60000) @@ -345,7 +345,7 @@ int bssgp_tx_fc_bvc(struct bssgp_bvc_ctx *bctx, uint8_t tag, else if (*queue_delay_ms == 0xFFFFFFFF) e_queue_delay = 0xFFFF; else - e_queue_delay = *queue_delay_ms / 10; + e_queue_delay = htons(*queue_delay_ms / 10); }
msg = bssgp_msgb_alloc();