From: Gunnar Beutner Date: Fri, 8 Mar 2013 15:36:26 +0000 (+0100) Subject: Fix another deadlock. X-Git-Tag: v0.0.2~314 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cf4397873cd8507d5f9ca5e52e2faf548f9d578d;p=icinga2 Fix another deadlock. --- 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()); }