Commit 46afcaf5 authored by Stefan Reif's avatar Stefan Reif

Use first redundancy packet for encoding timestamp

Instead of the data packet.
parent 4a777a3a
Pipeline #900 failed with stages
in 2 minutes and 11 seconds
......@@ -96,7 +96,6 @@ void *send_data_loop(void *ptr)
payload->groupRTT_us = PrrtChannelStateInformation_get_rtt(sock_ptr->csi);
PrrtPacket *packetToSend = PrrtPacket_copy(packet);
unsigned int seqno = packet->sequenceNumber;
send_packet(sock_ptr, packetToSend);
PrrtBlock_insert_data_packet(block, packet);
......@@ -104,9 +103,10 @@ void *send_data_loop(void *ptr)
// TODO: redundancy should only be sent when necessary
if(PrrtBlock_encode_ready(block)) {
uint32_t j = 0;
PrrtTimeStampCycle(sock_ptr, ts_data_packet, seqno, PrrtEncodeStart);
unsigned int redundancy_seqno = sock_ptr->sequenceNumberRedundancy;
PrrtTimeStampCycle(sock_ptr, ts_redundancy_packet, redundancy_seqno, PrrtEncodeStart);
PrrtBlock_encode(block, &sock_ptr->sequenceNumberRedundancy);
PrrtTimeStampCycle(sock_ptr, ts_data_packet, seqno, PrrtEncodeEnd);
PrrtTimeStampCycle(sock_ptr, ts_redundancy_packet, redundancy_seqno, PrrtEncodeEnd);
uint32_t redundancyPackets = List_count(block->redundancyPackets);
for(j = 0; j < redundancyPackets; j++) {
......
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