From e99c8a8e5a32a98f02ddf347a4a3e987cc9e6d8a Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 29 Aug 2019 11:27:34 +0200 Subject: [PATCH] First packets exchanged --- src/algo_thunder.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/algo_thunder.c b/src/algo_thunder.c index 8da5c8d..88f04cf 100644 --- a/src/algo_thunder.c +++ b/src/algo_thunder.c @@ -234,19 +234,21 @@ void adapt(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo, struct buff struct evt_core_fdinfo *to_fdinfo = NULL; for (int i = ui->ap_arr_vals-1; i >= 0; i--) { - fprintf(stderr, "i=%d, ui->ap_arr_vals=%d\n", i, ui->ap_arr_vals); + //fprintf(stderr, "i=%d, ui->ap_arr_vals=%d\n", i, ui->ap_arr_vals); if (ui->ap_arr_meta[i]->fmt.content.udp_metadata_thunder.id <= thunderc->recv_id) continue; thunderc->recv_id = ui->ap_arr_meta[i]->fmt.content.udp_metadata_thunder.id; // Find destination sprintf(url, "udp:write:127.0.0.1:%d", ui->ap_arr_pl[i]->fmt.content.udp_encapsulated.port); to_fdinfo = evt_core_get_from_url (ctx, url); + fprintf(stderr, "%s\n", url); if (to_fdinfo == NULL) { fprintf(stderr, "No fd for URL %s in tcp-read. Dropping packet :( \n", url); } struct buffer_packet *bp_dest = inject_buffer_tow (&app_ctx->br, to_fdinfo); - dump_buffer_packet (bp_dest); + bp_dest->mode = BP_WRITING; + //dump_buffer_packet (bp_dest); buffer_append_ap (bp_dest, ui->ap_arr_pl[i]); main_on_udp_write(ctx, to_fdinfo); }