Commented all config options for testing purposes and added next TODO's.
authorBjoern Sikora <bjoern.sikora@intra2net.com>
Mon, 10 Aug 2009 16:09:03 +0000 (18:09 +0200)
committerBjoern Sikora <bjoern.sikora@intra2net.com>
Mon, 10 Aug 2009 16:09:03 +0000 (18:09 +0200)
bpdyndnsd.conf
src/main.cpp
src/updater.cpp

index 5b127fa..e4aa406 100644 (file)
@@ -1,3 +1,3 @@
-daemon_mode=0
-loglevel=1
-syslog=1
+#daemon_mode=0
+#loglevel=0
+#syslog=0
index c287f6f..60b7196 100644 (file)
@@ -241,21 +241,25 @@ int main(int argc, char *argv[])
     {
         if ( is_online == true )
         {
+            // TODO: Get the actual IP of this host (through DNS or WEBCHECK_IP). Perhaps new Class which can handle both.
+
             // update all configured services
             updater->update_services();
         }
         else
         {
+            // We are in offline mode, do nothing, expect printing "offline mode".
             updater->get_logger()->print_offline_mode();
         }
 
+        // Snore, snore... don't hug the cpu if we are in daemon_mode.
         if ( updater->get_config()->get_daemon_mode() == 1 )
             sleep(5);
 
     }while ( updater->get_config()->get_daemon_mode() == 1 );
 
 
-    // serialize services to save their actual status
+    // Serialize services to save their actual state.
     if ( updater->get_config()->serialize_services() != 0 )
         return -1;
 
index 83bf3ed..e98e69c 100644 (file)
@@ -145,6 +145,7 @@ void Updater::update_services()
 
     BOOST_FOREACH(Service::Ptr &service, services )
     {
+        // TODO: only update if IP differs.
         service->update(ip);
     }
 }