diff options
author | Russ Dill <Russ.Dill@asu.edu> | 2004-05-19 08:29:05 +0000 |
---|---|---|
committer | Russ Dill <Russ.Dill@asu.edu> | 2004-05-19 08:29:05 +0000 |
commit | 309c7b71e66f45225f369591caf2441bfa2d1670 (patch) | |
tree | 364fc965115e6ba6010ec150f29334af25b159ee /networking/udhcp/dhcpc.c | |
parent | 91e006c1adf660a0180b6d3988a14150ccb36fa9 (diff) | |
download | busybox-w32-309c7b71e66f45225f369591caf2441bfa2d1670.tar.gz busybox-w32-309c7b71e66f45225f369591caf2441bfa2d1670.tar.bz2 busybox-w32-309c7b71e66f45225f369591caf2441bfa2d1670.zip |
fix timewarp in client (server fix later)
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r-- | networking/udhcp/dhcpc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index dda678933..449b51763 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
@@ -188,7 +188,7 @@ int main(int argc, char *argv[]) | |||
188 | int c, len; | 188 | int c, len; |
189 | struct dhcpMessage packet; | 189 | struct dhcpMessage packet; |
190 | struct in_addr temp_addr; | 190 | struct in_addr temp_addr; |
191 | time_t now; | 191 | long now; |
192 | int max_fd; | 192 | int max_fd; |
193 | int sig; | 193 | int sig; |
194 | 194 | ||
@@ -290,7 +290,7 @@ int main(int argc, char *argv[]) | |||
290 | 290 | ||
291 | for (;;) { | 291 | for (;;) { |
292 | 292 | ||
293 | tv.tv_sec = timeout - time(0); | 293 | tv.tv_sec = timeout - uptime(); |
294 | tv.tv_usec = 0; | 294 | tv.tv_usec = 0; |
295 | 295 | ||
296 | if (listen_mode != LISTEN_NONE && fd < 0) { | 296 | if (listen_mode != LISTEN_NONE && fd < 0) { |
@@ -310,7 +310,7 @@ int main(int argc, char *argv[]) | |||
310 | retval = select(max_fd + 1, &rfds, NULL, NULL, &tv); | 310 | retval = select(max_fd + 1, &rfds, NULL, NULL, &tv); |
311 | } else retval = 0; /* If we already timed out, fall through */ | 311 | } else retval = 0; /* If we already timed out, fall through */ |
312 | 312 | ||
313 | now = time(0); | 313 | now = uptime(); |
314 | if (retval == 0) { | 314 | if (retval == 0) { |
315 | /* timeout dropped to zero */ | 315 | /* timeout dropped to zero */ |
316 | switch (state) { | 316 | switch (state) { |