diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-19 22:03:07 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-19 22:03:07 +0200 |
commit | 194e1c878aa383994fef0cbbb3449fdaa599b53a (patch) | |
tree | fbb4ce72496c28659db2848c75edfbe8a59bc952 /src/socket.c | |
parent | 6798a76ffa1b4de4ec0ea07286c3510d86c0e3b6 (diff) | |
download | fastd-194e1c878aa383994fef0cbbb3449fdaa599b53a.tar fastd-194e1c878aa383994fef0cbbb3449fdaa599b53a.zip |
Keep a vector of pollfds instead of regenerating it all the time
Diffstat (limited to 'src/socket.c')
-rw-r--r-- | src/socket.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/socket.c b/src/socket.c index 4f5ac0f..6db4b9f 100644 --- a/src/socket.c +++ b/src/socket.c @@ -25,6 +25,7 @@ #include "fastd.h" +#include "poll.h" #include <fcntl.h> @@ -195,6 +196,8 @@ bool fastd_socket_handle_binds(fastd_context_t *ctx) { continue; } + fastd_poll_set_fd_sock(ctx, ctx->socks[i].fd, i); + fastd_peer_address_t bound_addr = *ctx->socks[i].bound_addr; if (!ctx->socks[i].addr->addr.sa.sa_family) bound_addr.sa.sa_family = AF_UNSPEC; |