Timeouts by reference are to count down to 0

To track how much time we've left for a request
This commit is contained in:
Willem Toorop 2014-10-13 15:36:21 +02:00
parent c9de395b44
commit 21bb7d6197
1 changed files with 6 additions and 5 deletions

View File

@ -123,11 +123,12 @@ static getdns_return_t submit_request_sync_stub(
static getdns_return_t submit_request_sync( static getdns_return_t submit_request_sync(
getdns_dns_req* req, struct getdns_context *context) getdns_dns_req* req, struct getdns_context *context)
{ {
if (context->resolution_type == GETDNS_RESOLUTION_STUB) { uint64_t timeout = context->timeout;
return submit_request_sync_stub(req, &(context->timeout)); if (context->resolution_type == GETDNS_RESOLUTION_STUB) {
} else { return submit_request_sync_stub(req, &timeout);
return submit_request_sync_rec(req, &(context->timeout)); } else {
} return submit_request_sync_rec(req, &timeout);
}
} }
getdns_return_t getdns_return_t