Fix scheduler

This commit is contained in:
Quentin 2019-08-29 18:25:37 +02:00
parent 124c0375c0
commit 2f73ea96e1

View file

@ -118,6 +118,7 @@ int schedule(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo, struct bu
sprintf(url, "tcp:write:127.0.0.1:%d", 7500 + thunderc->selected_link); sprintf(url, "tcp:write:127.0.0.1:%d", 7500 + thunderc->selected_link);
to_fdinfo = evt_core_get_from_url (ctx, url); to_fdinfo = evt_core_get_from_url (ctx, url);
} while (to_fdinfo == NULL); } while (to_fdinfo == NULL);
printf("URL %s has been retained\n", url);
// 2. We create the packet template // 2. We create the packet template
union abstract_packet links = { union abstract_packet links = {
@ -140,6 +141,7 @@ int schedule(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo, struct bu
thunderc->delta_t_per_link[i] += mili_sec; thunderc->delta_t_per_link[i] += mili_sec;
li[i].delta_t = thunderc->delta_t_per_link[i] > UINT16_MAX ? UINT16_MAX : thunderc->delta_t_per_link[i]; li[i].delta_t = thunderc->delta_t_per_link[i] > UINT16_MAX ? UINT16_MAX : thunderc->delta_t_per_link[i];
} }
thunderc->delta_t_per_link[thunderc->selected_link] = 0;
li[thunderc->selected_link].delta_t = 0; li[thunderc->selected_link].delta_t = 0;
if (ctx->verbose > 1) { if (ctx->verbose > 1) {