tbf: Move the LLC queue to GprsMs
Currently the enqueued DL LLC messages which have not yet passed to
RLC/MAC encoding are eventually copied from one TBF to the next one
(see gprs_rlcmac_dl_tbf::reuse_tbf). Since the enqueued LLC messages
are related to a specific MS, they should be stored at that layer.
This commit moves the gprs_llc_queue object to GprsMs and changes the
TBF's accessor methods accordingly. The LLC copying code is removed
from gprs_rlcmac_dl_tbf::reuse_tbf().
Sponsored-by: On-Waves ehf
diff --git a/src/gprs_ms.cpp b/src/gprs_ms.cpp
index f5b92d2..d047cf5 100644
--- a/src/gprs_ms.cpp
+++ b/src/gprs_ms.cpp
@@ -81,6 +81,7 @@
m_imsi[0] = 0;
memset(&m_timer, 0, sizeof(m_timer));
m_timer.cb = GprsMs::timeout;
+ m_llc_queue.init();
}
GprsMs::~GprsMs()
@@ -99,6 +100,7 @@
m_dl_tbf->set_ms(NULL);
m_dl_tbf = NULL;
}
+ m_llc_queue.clear(NULL);
}
void* GprsMs::operator new(size_t size)