aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-10-21 11:50:10 +0200
committerHarald Welte <laforge@gnumonks.org>2018-10-21 11:50:10 +0200
commit099f4f21693665356025c6a8de2a6ac101e6abbc (patch)
tree70b50029e65c821ffac11e414013826f327f6312
parent173d7fdbb9965fa1304420a30762831e2702e204 (diff)
gprs_rlcmac_received_lost(): Fix regression / uninitialized now_tv
In Change-Id I7d22e7b5902c230efeae66eb20c17026a4037887 we introduced the use of timespecsub(). Unfortuantely, we also accidentially removed the call to osmo_clock_gettime() along with it, leaving now_tv completely uninitialized. Change-Id: Ieced0c62700b2fe4ab0208258183154cc701490b Related: OS#3225 Fixes: Coverity CID#188872
-rw-r--r--src/gprs_rlcmac_meas.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gprs_rlcmac_meas.cpp b/src/gprs_rlcmac_meas.cpp
index f6448d5..9ff06db 100644
--- a/src/gprs_rlcmac_meas.cpp
+++ b/src/gprs_rlcmac_meas.cpp
@@ -131,6 +131,7 @@ int gprs_rlcmac_received_lost(struct gprs_rlcmac_dl_tbf *tbf, uint16_t received,
tbf->m_bw.dl_loss_received += received;
tbf->m_bw.dl_loss_lost += lost;
+ osmo_clock_gettime(CLOCK_MONOTONIC, &now_tv);
timespecsub(&now_tv, loss_tv, &elapsed);
if (elapsed.tv_sec < 1)
return 0;