mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
Fixed incorrect lock in Notification::BeginExecuteNotificationHelper().
This commit is contained in:
parent
cb907f4f3b
commit
ee4c8a5755
@ -196,6 +196,14 @@ void Notification::BeginExecuteNotification(const Notification::Ptr& self, Notif
|
|||||||
}
|
}
|
||||||
|
|
||||||
BOOST_FOREACH(const User::Ptr& user, allUsers) {
|
BOOST_FOREACH(const User::Ptr& user, allUsers) {
|
||||||
|
String user_name;
|
||||||
|
|
||||||
|
{
|
||||||
|
ObjectLock olock(user);
|
||||||
|
user_name = user->GetName();
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger::Write(LogDebug, "icinga", "Sending notification for user " + user_name);
|
||||||
BeginExecuteNotificationHelper(self, macros, type, user);
|
BeginExecuteNotificationHelper(self, macros, type, user);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,7 +219,7 @@ void Notification::BeginExecuteNotificationHelper(const Notification::Ptr& self,
|
|||||||
|
|
||||||
if (user) {
|
if (user) {
|
||||||
{
|
{
|
||||||
ObjectLock olock(self);
|
ObjectLock olock(user);
|
||||||
macroDicts.push_back(user->GetMacros());
|
macroDicts.push_back(user->GetMacros());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user