Commit d55b4652 authored by Andreas Schmidt's avatar Andreas Schmidt

Deleting BPTree contents too.

parent 4e698a03
Pipeline #105 failed with stage
......@@ -38,6 +38,7 @@ bool PrrtDataPacketStore_destroy(PrrtDataPacketStore *store)
BPTree_get_range(store->dataStore, dataList, 0, SEQNO_SPACE - 1);
while(List_count(dataList) > 0) {
PrrtPacket *packet = List_shift(dataList);
store->dataStore = BPTree_delete(store->dataStore, packet->sequenceNumber);
PrrtPacket_destroy(packet);
}
......
......@@ -25,6 +25,8 @@ bool PrrtPacketTimeoutTable_destroy(PrrtPacketTimeoutTable *table)
BPTree_get_range(table->packetList, list, 0, SEQNO_SPACE - 1);
while (List_count(list) > 0) {
PrrtPacket *packet = List_shift(list);
PrrtPacketDataPayload* payload = packet->payload;
table->packetList = BPTree_delete(table->packetList, payload->packetTimeout_us);
PrrtPacket_destroy(packet);
}
List_destroy(list);
......
......@@ -24,6 +24,7 @@ bool PrrtRepairBlockStore_destroy(PrrtRepairBlockStore *store)
BPTree_get_range(store->blockTree, blockList, 0, SEQNO_SPACE - 1);
while (List_count(blockList) > 0) {
PrrtBlock *block = List_shift(blockList);
store->blockTree = BPTree_delete(store->blockTree, block->baseSequenceNumber);
PrrtBlock_destroy(block);
}
......
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