~mdw
/
secnet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
logging: Provide lg_perror and lg_vperror
[secnet]
/
udp.c
diff --git
a/udp.c
b/udp.c
index
8ae5671
..
bb8d9ef
100644
(file)
--- a/
udp.c
+++ b/
udp.c
@@
-87,11
+87,7
@@
static int udp_beforepoll(void *state, struct pollfd *fds, int *nfds_io,
{
int i;
struct udp *st=state;
{
int i;
struct udp *st=state;
- if (*nfds_io<st->n_socks) {
- *nfds_io=st->n_socks;
- return ERANGE;
- }
- *nfds_io=st->n_socks;
+ BEFOREPOLL_WANT_FDS(st->n_socks);
for (i=0; i<st->n_socks; i++) {
fds[i].fd=st->socks[i].fd;
fds[i].events=POLLIN;
for (i=0; i<st->n_socks; i++) {
fds[i].fd=st->socks[i].fd;
fds[i].events=POLLIN;
@@
-330,7
+326,7
@@
static void udp_phase_hook(void *sst, uint32_t new_phase)
for (i=0; i<st->n_socks; i++)
udp_make_socket(st,&st->socks[i]);
for (i=0; i<st->n_socks; i++)
udp_make_socket(st,&st->socks[i]);
- register_for_poll(st,udp_beforepoll,udp_afterpoll,
MAX_SOCKETS,
"udp");
+ register_for_poll(st,udp_beforepoll,udp_afterpoll,"udp");
}
static list_t *udp_apply(closure_t *self, struct cloc loc, dict_t *context,
}
static list_t *udp_apply(closure_t *self, struct cloc loc, dict_t *context,