mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 14:44:32 +02:00
Fix crash in DbEvents::RemoveCommentInternal()
Missing multiple queries as implemented with RemoveDowntimeInternal(). fixes #10883
This commit is contained in:
parent
925161d9b4
commit
9424404b9e
@ -411,7 +411,7 @@ void DbEvents::RemoveCommentInternal(std::vector<DbQuery>& queries, const Commen
|
|||||||
query1.WhereCriteria = new Dictionary();
|
query1.WhereCriteria = new Dictionary();
|
||||||
query1.WhereCriteria->Set("object_id", checkable);
|
query1.WhereCriteria->Set("object_id", checkable);
|
||||||
query1.WhereCriteria->Set("internal_comment_id", comment->GetLegacyId());
|
query1.WhereCriteria->Set("internal_comment_id", comment->GetLegacyId());
|
||||||
DbObject::OnQuery(query1);
|
queries.push_back(query1);
|
||||||
|
|
||||||
/* History - update deletion time for service/host */
|
/* History - update deletion time for service/host */
|
||||||
unsigned long entry_time = static_cast<long>(comment->GetEntryTime());
|
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("object_id", checkable);
|
||||||
query2.WhereCriteria->Set("comment_time", DbValue::FromTimestamp(entry_time));
|
query2.WhereCriteria->Set("comment_time", DbValue::FromTimestamp(entry_time));
|
||||||
query2.WhereCriteria->Set("instance_id", 0); /* DbConnection class fills in real ID */
|
query2.WhereCriteria->Set("instance_id", 0); /* DbConnection class fills in real ID */
|
||||||
|
queries.push_back(query2);
|
||||||
DbObject::OnQuery(query2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* downtimes */
|
/* downtimes */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user