simplify packet manager and dispatcher

This commit is contained in:
liquidraver
2026-05-29 09:09:00 +02:00
parent 799d694914
commit b1f1c77b88
2 changed files with 2 additions and 10 deletions
+1 -2
View File
@@ -303,11 +303,10 @@ void Dispatcher::checkRecv()
logRx(pkt, pkt->getRawLength(), score);
if (pkt->isRouteFlood()) {
n_recv_flood++;
processRecvPacket(pkt);
} else {
n_recv_direct++;
processRecvPacket(pkt);
}
processRecvPacket(pkt);
}
}
+1 -8
View File
@@ -46,14 +46,7 @@ struct PacketQueue {
}
if (best_idx < 0) return nullptr;
Packet *top = _table[best_idx];
for (int i = best_idx; i < _num - 1; i++) {
_table[i] = _table[i + 1];
_pri_table[i] = _pri_table[i + 1];
_schedule_table[i] = _schedule_table[i + 1];
}
_num--;
return top;
return removeByIdx(best_idx);
}
Packet *removeByIdx(int i) {