Commit 98a7103f authored by Andreas Schmidt's avatar Andreas Schmidt

Move OnACK back.

parent 4c2bedbc
......@@ -45,9 +45,6 @@ static void handle_feedback(PrrtSocket *prrtSocket, const size_t length)
bool valid_sample = PrrtReceiver_updateAndGenerateRateSample(prrtSocket->receiver, feedbackPayload->ackSequenceNumber, feedbackPayload->ackPacketType, receiveTime);
if(prrtSocket->receiver->rateSample != NULL) {
BBR_OnACK(prrtSocket->receiver->bbr, prrtSocket->receiver->csi, prrtSocket->receiver->rateSample, prrtSocket->receiver->packetTracking);
}
if(valid_sample) {
PrrtChannelStateInformation_update_delivery_rate(prrtSocket->receiver->csi, prrtPacket, prrtSocket->receiver->rateSample);
}
......
......@@ -177,12 +177,18 @@ bool PrrtReceiver_updateAndGenerateRateSample(PrrtReceiver *recv, prrtSequenceNu
recv->packetTracking->pipe -= lostBytes;
recv->packetTracking->bytes_lost = lostBytes;
PrrtReceiver_updateRateSample(recv->rateSample, packet, receiveTime, recv->packetTracking);
bool result = PrrtReceiver_generateRateSample(recv->rateSample, recv->packetTracking);
recv->packetTracking->prior_inflight = recv->packetTracking->pipe;
if(recv->rateSample != NULL) {
BBR_OnACK(recv->bbr, recv->csi, recv->rateSample, recv->packetTracking);
}
check(pthread_mutex_unlock(&recv->lock) == 0, "Unlock failed.");
check(pthread_cond_broadcast(&recv->pipeNotFullCv) == 0, "Signal failed.");
recv->packetTracking->prior_inflight = recv->packetTracking->pipe;
return result;
error:
......
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