]> granicus.if.org Git - icinga2/commitdiff
Fix another deadlock.
authorGunnar Beutner <gunnar.beutner@netways.de>
Fri, 8 Mar 2013 15:36:26 +0000 (16:36 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Fri, 8 Mar 2013 15:36:26 +0000 (16:36 +0100)
lib/icinga/service.cpp

index 5a94b96dba996b5d9a0fe5f0ee9cdf7ddf7569e2..bb49c00ee8570d17b9dddc085b808fe7a691954a 100644 (file)
@@ -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());
 }