From: Christian Herdtweck Date: Fri, 19 Jun 2015 13:19:46 +0000 (+0200) Subject: moved 3 lines of Cname constructors from dnscache.cpp to cname.h X-Git-Url: http://developer.intra2net.com/git/?p=pingcheck;a=commitdiff_plain;h=4e691eb07de42c57a02b9edb30795d5fffbbadf1 moved 3 lines of Cname constructors from dnscache.cpp to cname.h (why would anybody search for Cname code in dnscache.cpp?) --- diff --git a/src/dns/cname.h b/src/dns/cname.h index 7f301be..883dc51 100644 --- a/src/dns/cname.h +++ b/src/dns/cname.h @@ -39,9 +39,12 @@ struct Cname std::string Host; TimeToLive Ttl; - Cname(); - Cname(const std::string &host, const uint32_t ttl); - Cname(const std::string &host, const TimeToLive &ttl); + Cname() {} + Cname(const std::string &host, const uint32_t ttl) + : Host(host), Ttl( TimeToLive(ttl) ) {} + + Cname(const std::string &host, const TimeToLive &ttl) + : Host(host), Ttl(ttl) {} // serialization friend class boost::serialization::access; diff --git a/src/dns/dnscache.cpp b/src/dns/dnscache.cpp index a0c2a1a..118f802 100644 --- a/src/dns/dnscache.cpp +++ b/src/dns/dnscache.cpp @@ -47,27 +47,9 @@ namespace Config { const int SAVE_TIMER_SECONDS = 60; const int CACHE_TIME_WARP_THRESH_HOURS = 24; + const int CACHE_REMOVE_OUTDATED_DAYS = 60; } -// ----------------------------------------------------------------------------- -// Cname -// ----------------------------------------------------------------------------- - -Cname::Cname() - : Host() - , Ttl() -{} - -Cname::Cname(const std::string &host, const uint32_t ttl) - : Host( host ) - , Ttl( ttl ) -{} - -Cname::Cname(const std::string &host, const TimeToLive &ttl) - : Host( host ) - , Ttl( ttl ) -{} - // ----------------------------------------------------------------------------- // DNS Cache constructor / destructor