From: Bjoern Sikora Date: Mon, 10 Aug 2009 16:09:03 +0000 (+0200) Subject: Commented all config options for testing purposes and added next TODO's. X-Git-Tag: v1.1~230 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=50d6311064b7e4565c8a8fe4fcd8f52d6ded0e85;p=bpdyndnsd Commented all config options for testing purposes and added next TODO's. --- diff --git a/bpdyndnsd.conf b/bpdyndnsd.conf index 5b127fa..e4aa406 100644 --- a/bpdyndnsd.conf +++ b/bpdyndnsd.conf @@ -1,3 +1,3 @@ -daemon_mode=0 -loglevel=1 -syslog=1 +#daemon_mode=0 +#loglevel=0 +#syslog=0 diff --git a/src/main.cpp b/src/main.cpp index c287f6f..60b7196 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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; diff --git a/src/updater.cpp b/src/updater.cpp index 83bf3ed..e98e69c 100644 --- a/src/updater.cpp +++ b/src/updater.cpp @@ -145,6 +145,7 @@ void Updater::update_services() BOOST_FOREACH(Service::Ptr &service, services ) { + // TODO: only update if IP differs. service->update(ip); } }