]> granicus.if.org Git - icinga2/commitdiff
Bugfix: Object source wasn't properly set.
authorGunnar Beutner <gunnar.beutner@netways.de>
Tue, 7 Aug 2012 10:47:18 +0000 (12:47 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Tue, 7 Aug 2012 10:47:18 +0000 (12:47 +0200)
components/cibsync/cibsynccomponent.cpp

index e1727f81994585397d902bd7cb5dbe4c21a6c933..ecd4ebf579d0f7d7abd0c83b09058a67b25de8ee 100644 (file)
@@ -215,14 +215,14 @@ void CIBSyncComponent::RemoteObjectUpdateHandler(const Endpoint::Ptr& sender, co
                        return;
                }
 
+               if (object->GetSource().IsEmpty())
+                       object->SetSource(sender->GetIdentity());
+
                object->Register();
        } else {
                if (object->IsLocal())
                        throw_exception(invalid_argument("Replicated remote object is marked as local."));
 
-               if (object->GetSource().IsEmpty())
-                       object->SetSource(sender->GetIdentity());
-
                // TODO: disallow config updates depending on endpoint config
 
                object->ApplyUpdate(update, Attribute_All);