Commit bb36e099 authored by Kai Vogelgesang's avatar Kai Vogelgesang Committed by Andreas Schmidt
Browse files

Fix packet being copied after destruction

parent 9e24dfe5
Pipeline #3127 failed with stages
in 1 minute and 30 seconds
......@@ -152,6 +152,10 @@ static void handle_data_packet(PrrtSocket *sock_ptr, PrrtPacket *packet) {
prrtSequenceNumber_t baseSequenceNumber = packet->sequenceNumber - packet->index;
PrrtPacket *reference = PrrtPacket_copy(packet);
// forward to application layer
debug(DEBUG_DATARECEIVER, "Forward: %u", seqno);
PrrtPacketDeliveryStore_insert(sock_ptr->packetDeliveryStore, packet);
PrrtBlock *block = PrrtRepairBlockStore_get_block(sock_ptr->repairBlockStore, baseSequenceNumber);
if (block != NULL) {
......@@ -169,7 +173,6 @@ static void handle_data_packet(PrrtSocket *sock_ptr, PrrtPacket *packet) {
XlapTimeStampClock(sock_ptr, ts_data_packet, seqno, PrrtReturnPackage);
XlapTimeStampCycle(sock_ptr, ts_data_packet, seqno, PrrtReturnPackage);
PrrtPacketDeliveryStore_insert(sock_ptr->packetDeliveryStore, packet);
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