aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-05-15 22:57:33 +0000
committerYang Tse <yangsita@gmail.com>2008-05-15 22:57:33 +0000
commit164a98511548585e587aa51f59d3cce72794700d (patch)
treee01da86896e73f9bdbea677553a5303db47550a6
parentade57a781cfc3ec6877acd6ab30225c20e3efd09 (diff)
millisecond resolution support followup
-rw-r--r--ares/ares_process.c2
-rw-r--r--ares/ares_timeout.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/ares/ares_process.c b/ares/ares_process.c
index eca363aec..660ad3011 100644
--- a/ares/ares_process.c
+++ b/ares/ares_process.c
@@ -110,7 +110,7 @@ int ares__timedout(struct timeval *now,
if(secs > 0)
return 1; /* yes, timed out */
- if(secs < -1)
+ if(secs < 0)
return 0; /* nope, not timed out */
/* if the full seconds were identical, check the sub second parts */
diff --git a/ares/ares_timeout.c b/ares/ares_timeout.c
index ce9849153..18ef6e8ca 100644
--- a/ares/ares_timeout.c
+++ b/ares/ares_timeout.c
@@ -64,8 +64,8 @@ struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv,
}
if(min_offset != -1) {
- nextstop = now;
- ares__timeadd(&now, min_offset);
+ nextstop.tv_sec = min_offset/1000;
+ nextstop.tv_usec = (min_offset%1000)*1000;
}
/* If we found a minimum timeout and it's sooner than the one specified in