]> granicus.if.org Git - icinga2/commitdiff
Fix some Ido initialization bugs
authorJean Flach <jean-marcel.flach@netways.de>
Tue, 11 Nov 2014 08:40:00 +0000 (09:40 +0100)
committerJean Flach <jean-marcel.flach@netways.de>
Tue, 11 Nov 2014 09:04:37 +0000 (10:04 +0100)
refs #7625

lib/db_ido/dbobject.cpp
lib/db_ido_mysql/idomysqlconnection.cpp
lib/db_ido_mysql/idomysqlconnection.hpp
lib/db_ido_pgsql/idopgsqlconnection.cpp
lib/db_ido_pgsql/idopgsqlconnection.hpp

index 28fbf8aee6992633a3aaa9fa0944499189b48745..6a7d19892154ec5510f380ce996c0d9d1f8c9ef9 100644 (file)
@@ -254,6 +254,7 @@ void DbObject::SendVarsStatusUpdate(void)
                        query.Table = "customvariablestatus";
                        query.Type = DbQueryInsert | DbQueryUpdate;
                        query.Category = DbCatState;
+                       query.StatusUpdate = true;
                        query.Fields = fields;
 
                        query.WhereCriteria = new Dictionary();
index e7b90e8700366f6576d81147c98386d192df82e8..902a8c2d36b51a5fac7553041a72cb57ae50cf78 100644 (file)
@@ -39,6 +39,10 @@ using namespace icinga;
 REGISTER_TYPE(IdoMysqlConnection);
 REGISTER_STATSFUNCTION(IdoMysqlConnectionStats, &IdoMysqlConnection::StatsFunc);
 
+IdoMysqlConnection::IdoMysqlConnection(void) 
+       : m_Connected(false) 
+{ }
+
 Value IdoMysqlConnection::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata)
 {
        Dictionary::Ptr nodes = new Dictionary();
index 6f7b81d8d5e90e5e8b4300b5b2af532b0fb5aab8..d0c4b75a3ed767158dfea1c64cfbcda7e0ed6b9d 100644 (file)
@@ -42,6 +42,8 @@ public:
        DECLARE_OBJECT(IdoMysqlConnection);
        DECLARE_OBJECTNAME(IdoMysqlConnection);
 
+       IdoMysqlConnection(void);
+
        static Value StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata);
 
 protected:
index 6a52fe862aef0bc5411a5aca18a4626a0252b4ad..ee2d7357d5cd98c127f39db339dc4aa3bd16b946 100644 (file)
@@ -41,6 +41,10 @@ REGISTER_TYPE(IdoPgsqlConnection);
 
 REGISTER_STATSFUNCTION(IdoPgsqlConnectionStats, &IdoPgsqlConnection::StatsFunc);
 
+IdoPgsqlConnection::IdoPgsqlConnection(void) 
+       : m_Connection(NULL)
+{ }
+
 Value IdoPgsqlConnection::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata)
 {
        Dictionary::Ptr nodes = new Dictionary();
index ea9dbd62fbc5392edcdfa3ece91aa6515abce8a2..d0e5ff99e4eedc3545de36a5c069cb393c10e4db 100644 (file)
@@ -42,6 +42,8 @@ public:
        DECLARE_OBJECT(IdoPgsqlConnection);
        DECLARE_OBJECTNAME(IdoPgsqlConnection);
 
+    IdoPgsqlConnection(void);
+    
        static Value StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata);
 
 protected: