diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-16 18:50:56 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-16 18:50:56 +0000 |
commit | e755e827f7c8ecb21787a4369d7afdeda54d112b (patch) | |
tree | 007b1506e69ffcc25bc6ba3b0e6686d806a34264 /networking | |
parent | ed6ac53104d811ee88c71aff45c7cad666aaee46 (diff) | |
download | busybox-w32-1_7_1.tar.gz busybox-w32-1_7_1.tar.bz2 busybox-w32-1_7_1.zip |
apply post 1.7.0 patches, set version to 1.7.11_7_1
Diffstat (limited to 'networking')
-rw-r--r-- | networking/isrv.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/networking/isrv.c b/networking/isrv.c index 1a41dd4fb..080c60fbd 100644 --- a/networking/isrv.c +++ b/networking/isrv.c | |||
@@ -21,20 +21,6 @@ | |||
21 | 21 | ||
22 | /* Helpers */ | 22 | /* Helpers */ |
23 | 23 | ||
24 | /* Even if _POSIX_MONOTONIC_CLOCK is defined, this | ||
25 | * may require librt */ | ||
26 | #if 0 /*def _POSIX_MONOTONIC_CLOCK*/ | ||
27 | static time_t monotonic_time(void) | ||
28 | { | ||
29 | struct timespec ts; | ||
30 | if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0) | ||
31 | time(&ts.tv_sec); | ||
32 | return ts.tv_sec; | ||
33 | } | ||
34 | #else | ||
35 | #define monotonic_time() (time(NULL)) | ||
36 | #endif | ||
37 | |||
38 | /* Opaque structure */ | 24 | /* Opaque structure */ |
39 | 25 | ||
40 | struct isrv_state_t { | 26 | struct isrv_state_t { |
@@ -258,7 +244,7 @@ static void handle_fd_set(isrv_state_t *state, fd_set *fds, int (*h)(int, void * | |||
258 | /* this peer is gone */ | 244 | /* this peer is gone */ |
259 | remove_peer(state, peer); | 245 | remove_peer(state, peer); |
260 | } else if (TIMEOUT) { | 246 | } else if (TIMEOUT) { |
261 | TIMEO_TBL[peer] = monotonic_time(); | 247 | TIMEO_TBL[peer] = monotonic_sec(); |
262 | } | 248 | } |
263 | } | 249 | } |
264 | } | 250 | } |
@@ -335,7 +321,7 @@ void isrv_run( | |||
335 | break; | 321 | break; |
336 | 322 | ||
337 | if (timeout) { | 323 | if (timeout) { |
338 | time_t t = monotonic_time(); | 324 | time_t t = monotonic_sec(); |
339 | if (t != CURTIME) { | 325 | if (t != CURTIME) { |
340 | CURTIME = t; | 326 | CURTIME = t; |
341 | handle_timeout(state, do_timeout); | 327 | handle_timeout(state, do_timeout); |