]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Don't bother waiting on a negative timeout and fix poll -> select error message.
authorRoy Marples <roy@marples.name>
Fri, 1 Aug 2008 10:22:44 +0000 (10:22 +0000)
committerRoy Marples <roy@marples.name>
Fri, 1 Aug 2008 10:22:44 +0000 (10:22 +0000)
client.c

index 346da0ceec135445fff176e5d5eae2432c736379..f2a71ff3f9a6266288d9f422a30de0a5fa9073de 100644 (file)
--- a/client.c
+++ b/client.c
@@ -807,6 +807,8 @@ wait_for_fd(struct if_state *state, int *fd)
        }
 
        ref = get_lowest_timer(state);
+       if (ref && timerneg(ref))
+               return 0;
 
        if (state->lease.leasetime == ~0U &&
            state->state == STATE_BOUND)
@@ -857,7 +859,7 @@ wait_for_fd(struct if_state *state, int *fd)
 
        if (r == -1) {
                if (errno != EINTR)
-                       logger(LOG_ERR, "poll: %s", strerror(errno));
+                       logger(LOG_ERR, "select: %s", strerror(errno));
                return -1;
        }
        if (r != 0) {