]> granicus.if.org Git - icinga2/commitdiff
Don't execute DB updates for agent host objects
authorGunnar Beutner <gunnar@beutner.name>
Tue, 27 Jan 2015 14:11:45 +0000 (15:11 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Tue, 27 Jan 2015 14:11:45 +0000 (15:11 +0100)
fixes #8296

lib/db_ido_mysql/idomysqlconnection.cpp
lib/db_ido_pgsql/idopgsqlconnection.cpp

index a0cad9ac76af5bf8ec1c6aec22c6da962bd68ffc..107625d5751b3a763d9030557c37f861e29a63d0 100644 (file)
@@ -600,6 +600,9 @@ void IdoMysqlConnection::InternalExecuteQuery(const DbQuery& query, DbQueryType
        if (!m_Connected)
                return;
 
+       if (query.Object && query.Object->GetObject()->GetExtension("agent_check").ToBool())
+               return;
+
        std::ostringstream qbuf, where;
        int type;
 
index d0626511158210141bbc24e5169dc6665cccc929..005fd3c7d648019481194a0ce4e1be0a4656a0fe 100644 (file)
@@ -594,6 +594,9 @@ void IdoPgsqlConnection::InternalExecuteQuery(const DbQuery& query, DbQueryType
        if (!m_Connection)
                return;
 
+       if (query.Object && query.Object->GetObject()->GetExtension("agent_check").ToBool())
+               return;
+
        std::ostringstream qbuf, where;
        int type;