From e20cb2e0c84ada6d1dc7bfc8223ef891bb70787f Mon Sep 17 00:00:00 2001 From: Robert Falkenberg Date: Wed, 11 May 2022 13:22:29 +0200 Subject: [PATCH] lib,rlc_am_nr: empty PDUs shall not increment metrics.num_tx_pdus --- lib/src/rlc/rlc_am_base.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/rlc/rlc_am_base.cc b/lib/src/rlc/rlc_am_base.cc index 4f4db569b..9c2ee0fb6 100644 --- a/lib/src/rlc/rlc_am_base.cc +++ b/lib/src/rlc/rlc_am_base.cc @@ -170,7 +170,7 @@ uint32_t rlc_am::read_pdu(uint8_t* payload, uint32_t nof_bytes) uint32_t read_bytes = tx_base->read_pdu(payload, nof_bytes); std::lock_guard lock(metrics_mutex); - metrics.num_tx_pdus++; + metrics.num_tx_pdus += read_bytes > 0 ? 1 : 0; metrics.num_tx_pdu_bytes += read_bytes; return read_bytes; }