From cf4397873cd8507d5f9ca5e52e2faf548f9d578d Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 8 Mar 2013 16:36:26 +0100 Subject: [PATCH] Fix another deadlock. --- lib/icinga/service.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/icinga/service.cpp b/lib/icinga/service.cpp index 5a94b96db..bb49c00ee 100644 --- a/lib/icinga/service.cpp +++ b/lib/icinga/service.cpp @@ -312,10 +312,12 @@ void Service::SetAcknowledgementExpiry(double timestamp) */ void Service::AcknowledgeProblem(AcknowledgementType type, double expiry) { - ObjectLock olock(this); + { + ObjectLock olock(this); - SetAcknowledgement(type); - SetAcknowledgementExpiry(expiry); + SetAcknowledgement(type); + SetAcknowledgementExpiry(expiry); + } RequestNotifications(NotificationAcknowledgement, GetLastCheckResult()); }