mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 06:34:42 +02:00
parent
fb323ee215
commit
a3e0c9d898
@ -84,16 +84,19 @@ void Checkable::SendNotifications(NotificationType type, const CheckResult::Ptr&
|
|||||||
|
|
||||||
std::set<Notification::Ptr> Checkable::GetNotifications(void) const
|
std::set<Notification::Ptr> Checkable::GetNotifications(void) const
|
||||||
{
|
{
|
||||||
|
boost::mutex::scoped_lock lock(m_NotificationMutex);
|
||||||
return m_Notifications;
|
return m_Notifications;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Checkable::AddNotification(const Notification::Ptr& notification)
|
void Checkable::AddNotification(const Notification::Ptr& notification)
|
||||||
{
|
{
|
||||||
|
boost::mutex::scoped_lock lock(m_NotificationMutex);
|
||||||
m_Notifications.insert(notification);
|
m_Notifications.insert(notification);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Checkable::RemoveNotification(const Notification::Ptr& notification)
|
void Checkable::RemoveNotification(const Notification::Ptr& notification)
|
||||||
{
|
{
|
||||||
|
boost::mutex::scoped_lock lock(m_NotificationMutex);
|
||||||
m_Notifications.erase(notification);
|
m_Notifications.erase(notification);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -302,6 +302,7 @@ private:
|
|||||||
|
|
||||||
/* Notifications */
|
/* Notifications */
|
||||||
std::set<Notification::Ptr> m_Notifications;
|
std::set<Notification::Ptr> m_Notifications;
|
||||||
|
mutable boost::mutex m_NotificationMutex;
|
||||||
|
|
||||||
/* Dependencies */
|
/* Dependencies */
|
||||||
mutable boost::mutex m_DependencyMutex;
|
mutable boost::mutex m_DependencyMutex;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user