diff --git a/src/algo_dup2.c b/src/algo_dup2.c index 5c4d3d1..076b108 100644 --- a/src/algo_dup2.c +++ b/src/algo_dup2.c @@ -53,9 +53,11 @@ int algo_dup2_on_datagram(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdin bp->ip.ap.str.id = dup2c->emit_id; dup2c->emit_id = dup2c->emit_id + 1; + struct evt_core_cat* cat = evt_core_get_from_cat (ctx, "tcp-write"); + for (int i = 0; i < 2; i++) { // 1. A whole packet has been read, we will find someone to write it - to_fdinfo = evt_core_get_from_url (ctx, url[i]); + to_fdinfo = g_array_index(cat->socklist, struct evt_core_fdinfo*, i); if (to_fdinfo == NULL) { fprintf(stderr, "No fd for URL %s in udp-read.\n", url[i]); continue;