@@ -1220,11 +1220,12 @@ bool ApiListener::RelayMessageOne(const Zone::Ptr& targetZone, const MessageOrig
1220
1220
ASSERT (targetZone);
1221
1221
1222
1222
Zone::Ptr localZone = Zone::GetLocalZone ();
1223
+ auto parentZone (localZone->GetParent ());
1223
1224
1224
1225
/* only relay the message to a) the same local zone, b) the parent zone and c) direct child zones. Exception is a global zone. */
1225
1226
if (!targetZone->GetGlobal () &&
1226
1227
targetZone != localZone &&
1227
- targetZone != localZone-> GetParent () &&
1228
+ targetZone != parentZone &&
1228
1229
targetZone->GetParent () != localZone) {
1229
1230
return true ;
1230
1231
}
@@ -1303,12 +1304,26 @@ bool ApiListener::RelayMessageOne(const Zone::Ptr& targetZone, const MessageOrig
1303
1304
bool isMaster = (currentZoneMaster == localEndpoint);
1304
1305
1305
1306
if (!isMaster && targetEndpoint != currentZoneMaster) {
1307
+ if (currentTargetZone == parentZone) {
1308
+ if (m_CurrentParentEndpoint.exchange (currentZoneMaster.get ()) != currentZoneMaster.get ()) {
1309
+ Log (LogInformation, " ApiListener" ) << " Relaying messages for parent Zone '"
1310
+ << parentZone->GetName () << " ' to Endpoint '" << currentZoneMaster->GetName () << " '" ;
1311
+ }
1312
+ }
1313
+
1306
1314
skippedEndpoints.push_back (targetEndpoint);
1307
1315
continue ;
1308
1316
}
1309
1317
1310
1318
relayed = true ;
1311
1319
1320
+ if (currentTargetZone == parentZone) {
1321
+ if (m_CurrentParentEndpoint.exchange (targetEndpoint.get ()) != targetEndpoint.get ()) {
1322
+ Log (LogInformation, " ApiListener" ) << " Relaying messages for parent Zone '"
1323
+ << parentZone->GetName () << " ' to Endpoint '" << targetEndpoint->GetName () << " '" ;
1324
+ }
1325
+ }
1326
+
1312
1327
SyncSendMessage (targetEndpoint, message);
1313
1328
}
1314
1329
0 commit comments