Small cosmetic changes
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 27 Jul 2009 08:05:04 +0000 (10:05 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 27 Jul 2009 08:05:04 +0000 (10:05 +0200)
src/config.cpp
src/config.h
src/dhs.cpp
src/ods.h
src/service.h
src/updater.cpp
src/updater.h

index 7727464..c259be0 100644 (file)
@@ -14,6 +14,9 @@
 
 // Define allowed command line and config file options
 Config::Config()
+    : daemon_mode(true)
+    , loglevel(0)
+    , syslog(true)
 {
     // Define valid command line parameters
     opt_desc_cmd = new po::options_description("Command line options");
@@ -147,6 +150,7 @@ int Config::load_config_from_files(string config_path)
     // then load all service definition files in config path
 
     // TODO: code to load service definition files in config path
+    return -1;
 }
 
 
index 190ac34..e6cd76f 100644 (file)
@@ -26,7 +26,8 @@
 namespace po = boost::program_options;
 using namespace std;
 
-class Config{
+class Config
+{
 private:
     po::options_description *opt_desc_cmd;
     po::options_description *opt_desc_conf_main;
index b526cbd..f7fb417 100644 (file)
 //
 #include "dhs.h"
 
-DHS::DHS(string hostname, string login, string password)
+DHS::DHS(string _hostname, string login, string password)
 {
-    this->hostname = hostname;
+    // Vielleicht: Hostname = _hostname;
+    this->hostname = _hostname;
     this->login = login;
     this->password = password;
 }
index d4f54db..70e8607 100644 (file)
--- a/src/ods.h
+++ b/src/ods.h
 using namespace std;
 
 /**
-       @author Bjoern Sikora <bjoern.sikora@intra2net.com>
+    @author Bjoern Sikora <bjoern.sikora@intra2net.com>
 */
-class ODS : public Service {
+class ODS : public Service
+{
 private:
     string hostname;
     string login;
index c3374a7..b000c1b 100644 (file)
 using namespace std;
 
 /**
-       @author Bjoern Sikora <bjoern.sikora@intra2net.com>
+    @author Bjoern Sikora <bjoern.sikora@intra2net.com>
 */
-class Service{
+class Service
+{
 public:
     Service();
 
-    ~Service();
+    virtual ~Service();
 
     virtual void update(string)=0;
 
index 97b84a5..d3d0c81 100644 (file)
@@ -15,6 +15,7 @@
 
 
 Updater::Updater()
+    : conf(NULL)
 {
 }
 
@@ -27,6 +28,7 @@ Updater::Updater(Config* conf)
 
 Updater::~Updater()
 {
+    conf = NULL;
 }
 
 
index 6d3bd41..550cf35 100644 (file)
@@ -14,7 +14,8 @@
 
 #include "config.h"
 
-class Updater{
+class Updater
+{
 private:
     Config* conf;