X-Git-Url: http://developer.intra2net.com/git/?a=blobdiff_plain;f=src%2Fserviceholder.cpp;h=e4041a82f32df94fd6bfeca50dc4f4b2deac18c9;hb=7335d7a7a9db007b02b47c30cc76148a9962e993;hp=e4a484bf85540c393db26660d7723789232e8e90;hpb=b6171a3f35e5d3bbb89f8ccc44b58d2514a2c795;p=bpdyndnsd diff --git a/src/serviceholder.cpp b/src/serviceholder.cpp index e4a484b..e4041a8 100644 --- a/src/serviceholder.cpp +++ b/src/serviceholder.cpp @@ -151,14 +151,17 @@ int Serviceholder::deserialize_services() BOOST_FOREACH(Service::Ptr &old_service, _old_services) { OldServices.push_back(old_service); - Log->print_service_object("Deserialized following Service object:", old_service->get_protocol(), old_service->get_hostname(), old_service->get_login() ,old_service->get_password(), old_service->get_update_interval(), old_service->get_max_updates_within_interval(), old_service->get_max_equal_updates_in_succession(), old_service->get_dns_cache_ttl() , old_service->get_actual_ip(), old_service->get_last_updates()); + Log->print_service_object("Deserialized following Service object:", old_service->get_protocol(), old_service->get_hostname(), old_service->get_login() ,old_service->get_password(), old_service->get_update_interval(), old_service->get_max_updates_within_interval(), old_service->get_max_equal_updates_in_succession(), old_service->get_dns_cache_ttl() , old_service->get_actual_ip(), old_service->get_last_updates(), old_service->get_activated()); BOOST_FOREACH(Service::Ptr &service, Services) { if ( *service == *old_service ) { service->set_last_updates(old_service->get_last_updates()); service->set_actual_ip(old_service->get_actual_ip()); - Log->print_service_object("New Service object with adopted values:", service->get_protocol(), service->get_hostname(), service->get_login() ,service->get_password(), service->get_update_interval(), service->get_max_updates_within_interval(), service->get_max_equal_updates_in_succession(), service->get_dns_cache_ttl() , service->get_actual_ip(), service->get_last_updates()); + if ( old_service->get_activated() ) + service->set_activated(); + + Log->print_service_object("New Service object with adopted values:", service->get_protocol(), service->get_hostname(), service->get_login() ,service->get_password(), service->get_update_interval(), service->get_max_updates_within_interval(), service->get_max_equal_updates_in_succession(), service->get_dns_cache_ttl() , service->get_actual_ip(), service->get_last_updates(), service->get_activated()); // We have adopted the values of the old_service. Just set lastupdated and timeout to 0, so this old_service wont be serialized. old_service->set_update_interval(0); }