From: Jean Flach Date: Tue, 11 Nov 2014 08:40:00 +0000 (+0100) Subject: Fix some Ido initialization bugs X-Git-Tag: v2.2.0~71 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0ba2efe97f420da5b7dca63a5fc2c087ca3d0494;p=icinga2 Fix some Ido initialization bugs refs #7625 --- diff --git a/lib/db_ido/dbobject.cpp b/lib/db_ido/dbobject.cpp index 28fbf8aee..6a7d19892 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 e7b90e870..902a8c2d3 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 6f7b81d8d..d0c4b75a3 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 6a52fe862..ee2d7357d 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 ea9dbd62f..d0e5ff99e 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: