gprs_rlc_ul_window: Make sure V(N) array is cleared during reset_state()
Otherwise unit tests (the only real used of that API so far) would end
up with v_r and v_q variables reset, but with previous state in v_n
array, which is not good.
Let's make sure everything is reset in
gprs_rlc_ul_window::reset_state(), and simply call that method during
constructor time.
Change-Id: I007b672527664b05353077b9208722056799f43f
diff --git a/src/rlc.h b/src/rlc.h
index 5c6930c..d4a7a5e 100644
--- a/src/rlc.h
+++ b/src/rlc.h
@@ -573,10 +573,8 @@
}
inline gprs_rlc_ul_window::gprs_rlc_ul_window()
- : m_v_r(0)
- , m_v_q(0)
{
- m_v_n.reset();
+ reset_state();
}
inline bool gprs_rlc_ul_window::is_in_window(uint16_t bsn) const
@@ -603,6 +601,7 @@
{
m_v_r = 0;
m_v_q = 0;
+ m_v_n.reset();
}
inline const void gprs_rlc_ul_window::set_v_r(int v_r)