Let be a bit more clever :D
This commit is contained in:
parent
79929eb5c8
commit
df4e56775d
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue