X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=adns.git;a=blobdiff_plain;f=src%2Finternal.h;fp=src%2Finternal.h;h=23c7aa6fddc3dd371173fc889e3c3af7260e2b94;hp=0fd64da3791fbe8ce89608676d756f07a1f78782;hb=514c20aa99cd2f29c7e5da1e263ab7e81e3a9ff3;hpb=3f3b27e453cd6b8f36c7375cfdd67235314838a9 diff --git a/src/internal.h b/src/internal.h index 0fd64da..23c7aa6 100644 --- a/src/internal.h +++ b/src/internal.h @@ -298,7 +298,7 @@ struct adns__query { int id, flags, retries; int udpnextserver; unsigned long udpsent; /* bitmap indexed by server */ - struct timeval timeout; + struct timeval timeout_expires; time_t expires; /* Earliest expiry time of any record we used. */ qcontext ctx; @@ -885,6 +885,11 @@ void adns__autosys(adns_state ads, struct timeval now); * lest we end up in recursive descent ! */ +void adns__timeout_set(adns_query qu, struct timeval now, int ms); +static inline void adns__timeout_clear(adns_query qu) + { timerclear(&qu->timeout_expires); } + + void adns__must_gettimeofday(adns_state ads, const struct timeval **now_io, struct timeval *tv_buf); /* Call with care - might reentrantly cause queries to be completed! */