moved 3 lines of Cname constructors from dnscache.cpp to cname.h
authorChristian Herdtweck <christian.herdtweck@intra2net.com>
Fri, 19 Jun 2015 13:19:46 +0000 (15:19 +0200)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Fri, 19 Jun 2015 13:19:46 +0000 (15:19 +0200)
(why would anybody search for Cname code in dnscache.cpp?)

src/dns/cname.h
src/dns/dnscache.cpp

index 7f301be..883dc51 100644 (file)
@@ -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;
index a0c2a1a..118f802 100644 (file)
@@ -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