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