Commit a6f4b002 authored by Andreas Schmidt's avatar Andreas Schmidt
Browse files

Naive cleanup of forwarding table.

parent 84d1dfbc
Pipeline #1450 passed with stages
in 2 minutes and 8 seconds
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "processes/dataTransmitter.h" #include "processes/dataTransmitter.h"
#include "processes/dataReceiver.h" #include "processes/dataReceiver.h"
#include "processes/feedbackReceiver.h" #include "processes/feedbackReceiver.h"
#include "stores/forwardPacketTable.h"
#include "types/packetTimeout.h" #include "types/packetTimeout.h"
#include "socket.h" #include "socket.h"
#include "receiver.h" #include "receiver.h"
...@@ -383,6 +384,7 @@ bool PrrtSocket_set_coding_parameters(PrrtSocket *sock_ptr, uint8_t k, uint8_t n ...@@ -383,6 +384,7 @@ bool PrrtSocket_set_coding_parameters(PrrtSocket *sock_ptr, uint8_t k, uint8_t n
bool PrrtSocket_cleanup(PrrtSocket *socket) { bool PrrtSocket_cleanup(PrrtSocket *socket) {
int i;
if (socket->isSender) { if (socket->isSender) {
} else { } else {
...@@ -400,6 +402,11 @@ bool PrrtSocket_cleanup(PrrtSocket *socket) { ...@@ -400,6 +402,11 @@ bool PrrtSocket_cleanup(PrrtSocket *socket) {
prrtSequenceNumber_t lastSequenceNumberBase = (prrtSequenceNumber_t) (last->sequenceNumber - prrtSequenceNumber_t lastSequenceNumberBase = (prrtSequenceNumber_t) (last->sequenceNumber -
last->index - 1); last->index - 1);
for (i = 0; i < (lastSequenceNumberBase - firstSequenceNumberBase); i++) {
PrrtForwardPacketTable_test_set_is_number_relevant(socket->forwardPacketTable,
(prrtSequenceNumber_t) (firstSequenceNumberBase + i));
}
PrrtRepairBlockStore_expire_block_range(socket->repairBlockStore, firstSequenceNumberBase, PrrtRepairBlockStore_expire_block_range(socket->repairBlockStore, firstSequenceNumberBase,
lastSequenceNumberBase); lastSequenceNumberBase);
...@@ -421,6 +428,7 @@ bool PrrtSocket_cleanup(PrrtSocket *socket) { ...@@ -421,6 +428,7 @@ bool PrrtSocket_cleanup(PrrtSocket *socket) {
debug(DEBUG_SOCKET, "Cleanup: [%d, %d, %d] expiring %d, data store: %d", firstSequenceNumberBase, debug(DEBUG_SOCKET, "Cleanup: [%d, %d, %d] expiring %d, data store: %d", firstSequenceNumberBase,
lastSequenceNumberBase, last->sequenceNumber, expired_count, dataPacketListSize); lastSequenceNumberBase, last->sequenceNumber, expired_count, dataPacketListSize);
} }
List_destroy(expired_packets); List_destroy(expired_packets);
} }
......
Supports Markdown
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