diff --git a/src/algo_lightning.c b/src/algo_lightning.c index c3a3f5b..362a09b 100644 --- a/src/algo_lightning.c +++ b/src/algo_lightning.c @@ -319,6 +319,8 @@ void algo_lightning_update_stats (struct light_ctx *lightc) { int64_t delta = 0; switch (lightc->historic[i].state) { case IN_ORDER: + lightc->stats[l].ooo += delta; + lightc->stats[l].meas_occ += 1; break; case OOO_ONGOING: timespec_diff(&now, &lightc->historic[i].detected_at, &temp_time); @@ -465,12 +467,12 @@ void algo_lightning_update_used(struct light_ctx *lightc, struct timespec *now) } // Do we have a good link not used? - for (int i = 0; i < lightc->used; i++) { + /*for (int i = 0; i < lightc->used; i++) { if (lightc->status[lightc->stats[i].link_id].used == LINK_NOT_USED) { not_to_used = lightc->stats[i].link_id; break; } - } + }*/ // Swap them printf("Link %d will be disabled, %d will be enabled\n", used_to_not, not_to_used);