[icinga-checkins] icinga.org: icinga2/master: Fix some Ido initialization bugs

git at icinga.org git at icinga.org
Tue Nov 11 10:08:38 CET 2014


Module: icinga2
Branch: master
Commit: 0ba2efe97f420da5b7dca63a5fc2c087ca3d0494
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=0ba2efe97f420da5b7dca63a5fc2c087ca3d0494

Author: Jean Flach <jean-marcel.flach at netways.de>
Date:   Tue Nov 11 09:40:00 2014 +0100

Fix some Ido initialization bugs

refs #7625

---

 lib/db_ido/dbobject.cpp                 |    1 +
 lib/db_ido_mysql/idomysqlconnection.cpp |    4 ++++
 lib/db_ido_mysql/idomysqlconnection.hpp |    2 ++
 lib/db_ido_pgsql/idopgsqlconnection.cpp |    4 ++++
 lib/db_ido_pgsql/idopgsqlconnection.hpp |    2 ++
 5 files changed, 13 insertions(+)

diff --git a/lib/db_ido/dbobject.cpp b/lib/db_ido/dbobject.cpp
index 28fbf8a..6a7d198 100644
--- a/lib/db_ido/dbobject.cpp
+++ b/lib/db_ido/dbobject.cpp
@@ -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();
diff --git a/lib/db_ido_mysql/idomysqlconnection.cpp b/lib/db_ido_mysql/idomysqlconnection.cpp
index e7b90e8..902a8c2 100644
--- a/lib/db_ido_mysql/idomysqlconnection.cpp
+++ b/lib/db_ido_mysql/idomysqlconnection.cpp
@@ -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();
diff --git a/lib/db_ido_mysql/idomysqlconnection.hpp b/lib/db_ido_mysql/idomysqlconnection.hpp
index 6f7b81d..d0c4b75 100644
--- a/lib/db_ido_mysql/idomysqlconnection.hpp
+++ b/lib/db_ido_mysql/idomysqlconnection.hpp
@@ -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:
diff --git a/lib/db_ido_pgsql/idopgsqlconnection.cpp b/lib/db_ido_pgsql/idopgsqlconnection.cpp
index 6a52fe8..ee2d735 100644
--- a/lib/db_ido_pgsql/idopgsqlconnection.cpp
+++ b/lib/db_ido_pgsql/idopgsqlconnection.cpp
@@ -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();
diff --git a/lib/db_ido_pgsql/idopgsqlconnection.hpp b/lib/db_ido_pgsql/idopgsqlconnection.hpp
index ea9dbd6..d0e5ff9 100644
--- a/lib/db_ido_pgsql/idopgsqlconnection.hpp
+++ b/lib/db_ido_pgsql/idopgsqlconnection.hpp
@@ -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:



More information about the icinga-checkins mailing list