|
|
|
@ -84,8 +84,9 @@ static void struct_timeval_to_ares_timeval(ares_timeval_t *atv, const struct tim |
|
|
|
|
atv->usec = (unsigned int)tv->tv_usec; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
struct timeval *ares_timeout(const ares_channel_t *channel, |
|
|
|
|
struct timeval *maxtv, struct timeval *tvbuf) |
|
|
|
|
static struct timeval *ares_timeout_int(const ares_channel_t *channel, |
|
|
|
|
struct timeval *maxtv, |
|
|
|
|
struct timeval *tvbuf) |
|
|
|
|
{ |
|
|
|
|
const struct query *query; |
|
|
|
|
ares__slist_node_t *node; |
|
|
|
@ -130,3 +131,20 @@ struct timeval *ares_timeout(const ares_channel_t *channel, |
|
|
|
|
|
|
|
|
|
return tvbuf; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
struct timeval *ares_timeout(const ares_channel_t *channel, |
|
|
|
|
struct timeval *maxtv, struct timeval *tvbuf) |
|
|
|
|
{ |
|
|
|
|
struct timeval *rv; |
|
|
|
|
|
|
|
|
|
if (channel == NULL || tvbuf == NULL) |
|
|
|
|
return NULL; |
|
|
|
|
|
|
|
|
|
ares__channel_lock(channel); |
|
|
|
|
|
|
|
|
|
rv = ares_timeout_int(channel, maxtv, tvbuf); |
|
|
|
|
|
|
|
|
|
ares__channel_unlock(channel); |
|
|
|
|
|
|
|
|
|
return rv; |
|
|
|
|
} |
|
|
|
|