]> granicus.if.org Git - icinga2/commitdiff
Fix crash in DbEvents::RemoveCommentInternal()
authorMichael Friedrich <michael.friedrich@netways.de>
Fri, 18 Dec 2015 09:52:04 +0000 (10:52 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Tue, 23 Feb 2016 08:16:35 +0000 (09:16 +0100)
Missing multiple queries as implemented with RemoveDowntimeInternal().

fixes #10883

lib/db_ido/dbevents.cpp

index d9dbd3355ecca1771a1978790e198587fc9abaca..bcd86b80d37968e0259e9a628685d2b790101e4a 100644 (file)
@@ -411,7 +411,7 @@ void DbEvents::RemoveCommentInternal(std::vector<DbQuery>& queries, const Commen
        query1.WhereCriteria = new Dictionary();
        query1.WhereCriteria->Set("object_id", checkable);
        query1.WhereCriteria->Set("internal_comment_id", comment->GetLegacyId());
-       DbObject::OnQuery(query1);
+       queries.push_back(query1);
 
        /* History - update deletion time for service/host */
        unsigned long entry_time = static_cast<long>(comment->GetEntryTime());
@@ -434,8 +434,7 @@ void DbEvents::RemoveCommentInternal(std::vector<DbQuery>& queries, const Commen
        query2.WhereCriteria->Set("object_id", checkable);
        query2.WhereCriteria->Set("comment_time", DbValue::FromTimestamp(entry_time));
        query2.WhereCriteria->Set("instance_id", 0); /* DbConnection class fills in real ID */
-
-       DbObject::OnQuery(query2);
+       queries.push_back(query2);
 }
 
 /* downtimes */