Add missing information

This commit is contained in:
Quentin 2019-05-14 12:02:56 +02:00
parent 46f54fd145
commit 05384a424a

View file

@ -233,15 +233,17 @@ int algo_rr_on_datagram(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo
bp->ip.ap.fmt.content.health.bitfield = rr->remote_links; bp->ip.ap.fmt.content.health.bitfield = rr->remote_links;
rr->sent_health_id++; rr->sent_health_id++;
// 5. Append clear packet // 5. Append clear packet
clear_packet.ip.ap.fmt.content.clear.id = rr->sent_content_id; clear_packet.ip.ap.fmt.content.clear.id = rr->sent_content_id;
rr->sent_content_id++; rr->sent_content_id++;
bp->ip.ap.fmt.content.health.min_blocked_pkt = clear_packet.ip.ap.fmt.content.clear.id;
append_buffer (&bp->ip.ap, 1, &clear_packet.ip.ap); append_buffer (&bp->ip.ap, 1, &clear_packet.ip.ap);
bp->ap_count++; bp->ap_count++;
// 6. Append redundancy if needed // 6. Append redundancy if needed
if (app_ctx->ap.redundant_data == 1) { if (app_ctx->ap.redundant_data == 1) {
assert(ring_gt(bp->ip.ap.fmt.content.health.min_blocked_pkt, rr->prev_packet.ap.fmt.content.clear.id));
bp->ip.ap.fmt.content.health.min_blocked_pkt = rr->prev_packet.ap.fmt.content.clear.id;
append_buffer(&bp->ip.ap, 2, &rr->prev_packet.ap); // We append previous packet append_buffer(&bp->ip.ap, 2, &rr->prev_packet.ap); // We append previous packet
append_buffer(&rr->prev_packet.ap, 0, &clear_packet.ip.ap); // We store current packet for next time append_buffer(&rr->prev_packet.ap, 0, &clear_packet.ip.ap); // We store current packet for next time
bp->ap_count++; bp->ap_count++;