summaryrefslogtreecommitdiff
path: root/include/dns.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/dns.h')
-rw-r--r--include/dns.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/include/dns.h b/include/dns.h
index f79121ab3..3d326a69c 100644
--- a/include/dns.h
+++ b/include/dns.h
@@ -84,19 +84,12 @@ class CoreExport CachedQuery
* @param res The result data, an IP or hostname
* @param ttl The time-to-live value of the query result
*/
- CachedQuery(const std::string &res, unsigned int ttl) : data(res)
- {
- expires = time(NULL) + ttl;
- }
+ CachedQuery(const std::string &res, unsigned int ttl);
/** Returns the number of seconds remaining before this
* cache item has expired and should be removed.
*/
- int CalcTTLRemaining()
- {
- int n = (int)expires - (int)time(NULL);
- return (n < 0 ? 0 : n);
- }
+ int CalcTTLRemaining();
};
/** DNS cache information. Holds IPs mapped to hostnames, and hostnames mapped to IPs.