diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2016-03-26 23:13:57 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2016-03-26 23:14:14 +0100 |
commit | 9b84e5e3b0d2fd29391618fb56367a4661732b60 (patch) | |
tree | 9ebd192a39224482a1efd5bd63e0342f7cae8d82 | |
parent | a2c6604e73e389d2ad861dbb62367c0c96551032 (diff) | |
download | fastd-9b84e5e3b0d2fd29391618fb56367a4661732b60.tar fastd-9b84e5e3b0d2fd29391618fb56367a4661732b60.zip |
poll: fix epoll support
-rw-r--r-- | cmake/config.cmake | 2 | ||||
-rw-r--r-- | src/poll.c | 9 |
2 files changed, 2 insertions, 9 deletions
diff --git a/cmake/config.cmake b/cmake/config.cmake index 9ddf5bf..049304f 100644 --- a/cmake/config.cmake +++ b/cmake/config.cmake @@ -12,7 +12,7 @@ endif() set(USE_BINDTODEVICE ${LINUX}) -set(USE_EPOLL FALSE) +set(USE_EPOLL ${LINUX}) set(USE_FREEBIND ${LINUX}) set(USE_PMTU ${LINUX}) set(USE_PKTINFO ${LINUX}) @@ -164,14 +164,7 @@ bool fastd_poll_fd_close(fastd_poll_fd_t *fd) { void fastd_poll_handle(void) { - int maintenance_timeout = ctx.next_maintenance - ctx.now; - - if (maintenance_timeout < 0) - maintenance_timeout = 0; - - int timeout = handshake_timeout(); - if (timeout < 0 || timeout > maintenance_timeout) - timeout = maintenance_timeout; + int timeout = task_timeout(); struct epoll_event events[16]; int ret = epoll_wait_unblocked(ctx.epoll_fd, events, 16, timeout); |