}
Log(LogInformation, "ApiListener")
- << "Applying config update from endpoint '" << origin->FromClient->GetEndpoint()->GetName() << "' of zone '"
- << origin->FromZone->GetName() << "'";
+ << "Applying config update from endpoint '" << origin->FromClient->GetEndpoint()->GetName()
+ << "' of zone '" << GetFromZoneName(origin->FromZone) << "'.";
Dictionary::Ptr updateV1 = params->Get("update");
Dictionary::Ptr updateV2 = params->Get("update_v2");
return zone->IsSingleInstance();
}
+/* Provide a helper function for zone origin name. */
+String ApiListener::GetFromZoneName(const Zone::Ptr& fromZone)
+{
+ String fromZoneName;
+
+ if (fromZone) {
+ fromZoneName = fromZone->GetName();
+ } else {
+ Zone::Ptr lzone = Zone::GetLocalZone();
+
+ if (lzone)
+ fromZoneName = lzone->GetName();
+ }
+
+ return fromZoneName;
+}
static void UpdateObjectAuthority(void);
static bool IsHACluster(void);
+ static String GetFromZoneName(const Zone::Ptr& fromZone);
protected:
virtual void OnConfigLoaded(void) override;