mirror of https://github.com/Icinga/icinga2.git
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) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -211,7 +219,7 @@ void Notification::BeginExecuteNotificationHelper(const Notification::Ptr& self,
|
|||
|
||||
if (user) {
|
||||
{
|
||||
ObjectLock olock(self);
|
||||
ObjectLock olock(user);
|
||||
macroDicts.push_back(user->GetMacros());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue