if (object->GetPackage() != "_api")
return;
+ /* don't sync objects without a zone attribute */
+ if (object->GetZoneName().IsEmpty())
+ return;
+
Dictionary::Ptr message = new Dictionary();
message->Set("jsonrpc", "2.0");
message->Set("method", "config::UpdateObject");
if (object->GetPackage() != "_api")
return;
+ /* don't sync objects without a zone attribute */
+ if (object->GetZoneName().IsEmpty())
+ return;
+
Dictionary::Ptr message = new Dictionary();
message->Set("jsonrpc", "2.0");
message->Set("method", "config::DeleteObject");
String objZone = object->GetZoneName();
- /* only sync objects in the same zone if no zone attribute was set */
- if (objZone.IsEmpty() && azone != lzone) {
- Log(LogDebug, "ApiListener")
- << "Skipping sync: No object zone specified and client zone '"
- << azone->GetName() << "' does not match local zone '"
- << lzone->GetName() << "'.";
+ /* don't sync objects without a zone attribute */
+ if (objZone.IsEmpty())
continue;
- }
/* don't sync objects for non-matching parent-child zones */
- if (!objZone.IsEmpty() && !azone->IsChildOf(lzone)) {
+ if (!azone->IsChildOf(lzone) && azone != lzone) {
Log(LogDebug, "ApiListener")
<< "Skipping sync: object zone '" << objZone
<< "' defined but client zone '" << azone->GetName()