Skip to content

Commit

Permalink
Merge pull request #1484 from lf-lang/fed-gen-docker
Browse files Browse the repository at this point in the history
Fixing the loss of the hostname that is specified in a federated lf f…
  • Loading branch information
lhstrh authored Nov 21, 2022
2 parents 3d76b1b + 0b45929 commit 82a33be
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,13 @@ private void analyzeFederates(Reactor fedReactor) {
mainDef.setName(fedReactor.getName());
mainDef.setReactorClass(fedReactor);

// Make sure that if no federation RTI properties were given in the
// cmdline, then those specified in the lf file are not lost
if (federationRTIProperties.get("host").equals("localhost") &&
!fedReactor.getHost().getAddr().equals("localhost")) {
federationRTIProperties.put("host", fedReactor.getHost().getAddr());
}

// Since federates are always within the main (federated) reactor,
// create a list containing just that one containing instantiation.
// This will be used to look up parameter values.
Expand Down

0 comments on commit 82a33be

Please sign in to comment.