]> granicus.if.org Git - icinga2/commitdiff
Fix: Deleting an object via API does not disable it in DB IDO
authorMichael Friedrich <michael.friedrich@netways.de>
Fri, 5 Feb 2016 11:37:00 +0000 (12:37 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Tue, 23 Feb 2016 08:43:41 +0000 (09:43 +0100)
fixes #11065

lib/db_ido/dbconnection.cpp

index 64875d8223908d72052b3e6d710bdd4aca24515a..514e7bc519210df9458f86a0638250223e457f35 100644 (file)
@@ -407,8 +407,12 @@ void DbConnection::UpdateObject(const ConfigObject::Ptr& object)
                        ActivateObject(dbobj);
                        dbobj->SendConfigUpdate();
                        dbobj->SendStatusUpdate();
-               } else if (!active && dbActive)
+               } else if (!active) {
+                       /* Deactivate the deleted object no matter
+                        * which state it had in the database.
+                        */
                        DeactivateObject(dbobj);
+               }
        }
 }