finished self-implementation of DNS resolver recursion; will now remove all that!
[pingcheck] / src / dns / hostaddress.h
index 9696843..d5fdf18 100644 (file)
@@ -28,7 +28,6 @@ on this file might be covered by the GNU General Public License.
 #include <boost/serialization/access.hpp>
 #include <boost/serialization/nvp.hpp>
 #include <boost/serialization/split_member.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
 
 #include "dns/timetolive.h"
 
@@ -66,28 +65,18 @@ private:
     void save(Archive & ar, const unsigned int version) const
     {
         std::string ip = Ip.to_string();
-        std::string ttl_creation_time = boost::posix_time::to_iso_string(
-                                                                Ttl.TtlSetTime);
         ar & BOOST_SERIALIZATION_NVP(ip);
-        ar & BOOST_SERIALIZATION_NVP(Ttl.Ttl);
-        ar & BOOST_SERIALIZATION_NVP(ttl_creation_time);
+        ar & BOOST_SERIALIZATION_NVP(Ttl);
     }
 
     template<class Archive>
     void load(Archive & ar, const unsigned int version)
     {
         std::string ip;
-        uint32_t ttl_seconds;
-        std::string ttl_creation_time;
         ar & BOOST_SERIALIZATION_NVP(ip);
-        ar & BOOST_SERIALIZATION_NVP(ttl_seconds);
-        ar & BOOST_SERIALIZATION_NVP(ttl_creation_time);
-
-        // now convert to Ip and Ttl
+        ar & BOOST_SERIALIZATION_NVP(Ttl);
         Ip = boost::asio::ip::address::from_string(ip);
-        Ttl = TimeToLive();
-        Ttl.Ttl = ttl_seconds;
-        Ttl.TtlSetTime = boost::posix_time::from_iso_string(ttl_creation_time);
+
     }
 
     BOOST_SERIALIZATION_SPLIT_MEMBER()