From 159104ce9ceb9e4a5d6e30da942c8c5dadc6a0d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Sat, 9 Mar 2019 14:39:22 +0000 Subject: [PATCH] Don't wake up without paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adrien Gallouët --- mud | 2 +- src/bind.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mud b/mud index eab4cdb..f67a5b4 160000 --- a/mud +++ b/mud @@ -1 +1 @@ -Subproject commit eab4cdb1ad758f4f9d0b9eeb578a6bbc3bd4420b +Subproject commit f67a5b4fed0208fcffe8502473099c70b685342f diff --git a/src/bind.c b/src/bind.c index 992eb6f..0f98ca7 100644 --- a/src/bind.c +++ b/src/bind.c @@ -207,7 +207,7 @@ gt_bind(int argc, char **argv) unsigned char buf[4096]; while (!gt_quit) { - unsigned long send_wait = mud_send_wait(mud); + long send_wait = mud_send_wait(mud); if (send_wait) { FD_CLR(tun_fd, &rfds); @@ -223,7 +223,7 @@ gt_bind(int argc, char **argv) .tv_usec = send_wait, }; - const int ret = select(last_fd, &rfds, NULL, NULL, send_wait ? &tv : NULL); + const int ret = select(last_fd, &rfds, NULL, NULL, send_wait > 0 ? &tv : NULL); if (ret == -1) { if (errno == EBADF) {