Commit e909991e authored by aligungr's avatar aligungr

RLS improvements

parent 45996520
......@@ -105,7 +105,7 @@ void RlsControlTask::handleRlsMessage(int cellId, rls::RlsMessage &msg)
{
auto &m = (rls::RlsPduTransmission &)msg;
if (m.pduId != 0)
m_pendingAck[m.pduId] = cellId;
m_pendingAck[cellId].push_back(m.pduId);
if (m.pduType == rls::EPduType::DATA)
{
......@@ -191,14 +191,10 @@ void RlsControlTask::onAckControlTimerExpired()
void RlsControlTask::onAckSendTimerExpired()
{
std::unordered_map<int, std::vector<uint32_t>> ackData;
for (auto &pendingAck : m_pendingAck)
ackData[pendingAck.second].push_back(pendingAck.first);
auto copy = m_pendingAck;
m_pendingAck.clear();
for (auto &item : ackData)
for (auto &item : copy)
{
rls::RlsPduTransmissionAck msg{m_sti};
msg.pduIds = std::move(item.second);
......
......@@ -36,7 +36,7 @@ class RlsControlTask : public NtsTask
RlsUdpTask *m_udpTask;
std::unordered_map<uint32_t, PduInfo> m_pduMap;
uint64_t m_sti;
std::unordered_map<uint32_t, int> m_pendingAck;
std::unordered_map<int, std::vector<uint32_t>> m_pendingAck;
public:
explicit RlsControlTask(TaskBase *base, uint64_t sti);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment