Commit 07bc5741 authored by Andreas Schmidt's avatar Andreas Schmidt

Fix errors in channel state information.

parent 43734ead
Pipeline #2148 failed with stages
in 21 seconds
......@@ -52,20 +52,9 @@ void PrrtChannelStateInformation_update_plr(PrrtChannelStateInformation *csi, pr
}
void PrrtChannelStateInformation_update_delivery_rate(PrrtChannelStateInformation *csi, PrrtPacket* packet, PrrtRateSample *rateSample) {
void PrrtChannelStateInformation_update_delivery_rate(PrrtChannelStateInformation *csi, PrrtPacket* packet, prrtDeliveryRate_t rate) {
pthread_mutex_lock(&csi->lock);
prrtDeliveryRate_t rate = rateSample->delivery_rate;
csi->deliveryRate = rate;
if(csi->btlbw_rounds > csi->btlbw_filter_length_rtts) {
csi->btlbw = 0;
}
csi->btlbw_rounds += 1;
if(csi->btlbw < rate) {
csi->btlbw = rate;
csi->btlbw_rounds = 0;
}
pthread_mutex_unlock(&csi->lock);
}
void PrrtChannelStateInformation_update_app_limited(PrrtChannelStateInformation *csi, bool appLimited) {
......
......@@ -35,7 +35,7 @@ bool PrrtChannelStateInformation_get_app_limited(PrrtChannelStateInformation *cs
prrtPacketLossRate_t PrrtChannelStateInformation_get_plr(PrrtChannelStateInformation* csi);
void PrrtChannelStateInformation_update_plr(PrrtChannelStateInformation *csi, prrtSequenceNumber_t erasures,
prrtSequenceNumber_t packets);
void PrrtChannelStateInformation_update_delivery_rate(PrrtChannelStateInformation *csi, PrrtPacket* packet, PrrtRateSample *rate);
void PrrtChannelStateInformation_update_delivery_rate(PrrtChannelStateInformation *csi, PrrtPacket* packet, prrtDeliveryRate_t rate);
void PrrtChannelStateInformation_update_app_limited(PrrtChannelStateInformation *csi, bool appLimited);
bool PrrtChannelStateInformation_destroy(PrrtChannelStateInformation* csi);
......
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