tcp_startrecv(dns_dispatch_t *disp, dns_dispentry_t *resp);
static void
tcp_dispatch_getnext(dns_dispatch_t *disp, dns_dispentry_t *resp,
- int32_t timeout);
+ int64_t timeout);
static void
-udp_dispatch_getnext(dns_dispentry_t *resp, int32_t timeout);
+udp_dispatch_getnext(dns_dispentry_t *resp, int64_t timeout);
static const char *
socktype2str(dns_dispentry_t *resp) {
unsigned int flags;
isc_sockaddr_t peer;
isc_netaddr_t netaddr;
- int match, timeout = 0;
+ int match;
+ int64_t timeout = 0;
bool respond = true;
isc_time_t now;
dns_dispatch_t *disp = resp->disp;
isc_result_t result = ISC_R_SUCCESS;
- int32_t timeout = 0;
+ int64_t timeout = 0;
dispentry_log(resp, ISC_LOG_DEBUG(90), "getnext for QID %d", resp->id);
}
}
- REQUIRE(disp->tid == isc_tid());
+ INSIST(disp->tid == isc_tid());
switch (disp->socktype) {
case isc_socktype_udp:
udp_dispatch_getnext(resp, timeout);
static void
tcp_dispatch_getnext(dns_dispatch_t *disp, dns_dispentry_t *resp,
- int32_t timeout) {
- REQUIRE(timeout <= INT16_MAX);
-
+ int64_t timeout) {
dispentry_log(resp, ISC_LOG_DEBUG(90), "continue reading");
if (!resp->reading) {
return;
}
- if (timeout > 0) {
+ if (timeout != 0) {
+ INSIST(timeout > 0 && timeout <= UINT32_MAX);
isc_nmhandle_settimeout(disp->handle, timeout);
}
}
static void
-udp_dispatch_getnext(dns_dispentry_t *resp, int32_t timeout) {
- REQUIRE(timeout <= INT16_MAX);
-
+udp_dispatch_getnext(dns_dispentry_t *resp, int64_t timeout) {
if (resp->reading) {
return;
}
- if (timeout > 0) {
+ if (timeout != 0) {
+ INSIST(timeout > 0 && timeout <= UINT32_MAX);
isc_nmhandle_settimeout(resp->handle, timeout);
}
}
void
-dns_dispatch_resume(dns_dispentry_t *resp, uint16_t timeout) {
+dns_dispatch_resume(dns_dispentry_t *resp, unsigned int timeout) {
REQUIRE(VALID_RESPONSE(resp));
REQUIRE(VALID_DISPATCH(resp->disp));