X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/adns/blobdiff_plain/4353a5c47b202786905257e520fe570a570e67bc..94436798148b6859a335d1e7c35c432904165e6d:/src/internal.h diff --git a/src/internal.h b/src/internal.h index b652f23..5b5097b 100644 --- a/src/internal.h +++ b/src/internal.h @@ -17,7 +17,7 @@ typedef unsigned char byte; /* Configuration and constants */ #define MAXSERVERS 5 -#define MAXUDPRETRIES 15 +#define MAXUDPRETRIES /*15*/5 #define UDPRETRYMS 2000 #define TCPMS 30000 #define LOCALRESOURCEMS 20 @@ -175,9 +175,9 @@ static inline void timevaladd(struct timeval *tv_io, long ms) { struct timeval tmp; assert(ms>=0); tmp= *tv_io; - tmp.tv_usec += (ms%1000)*1000; + tmp.tv_usec += (ms%1000)*1000000; tmp.tv_sec += ms/1000; - if (tmp.tv_usec >= 1000) { tmp.tv_sec++; tmp.tv_usec -= 1000; } + if (tmp.tv_usec >= 1000000) { tmp.tv_sec++; tmp.tv_usec -= 1000; } *tv_io= tmp; }