aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
authorruss <russ@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-05-19 08:29:05 +0000
committerruss <russ@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-05-19 08:29:05 +0000
commitee9ca3a4e260a8a74059c51b723c3e746eb841de (patch)
tree364fc965115e6ba6010ec150f29334af25b159ee /networking/udhcp/dhcpc.c
parent7c1177c2157a076492f817539d10449ca1156e57 (diff)
downloadbusybox-w32-ee9ca3a4e260a8a74059c51b723c3e746eb841de.tar.gz
busybox-w32-ee9ca3a4e260a8a74059c51b723c3e746eb841de.tar.bz2
busybox-w32-ee9ca3a4e260a8a74059c51b723c3e746eb841de.zip
fix timewarp in client (server fix later)
git-svn-id: svn://busybox.net/trunk/busybox@8857 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r--networking/udhcp/dhcpc.c6
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) {