First packets exchanged
This commit is contained in:
parent
33b45583a2
commit
e99c8a8e5a
1 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue