]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/routing/VivaldiZone.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
NetZoneImpl: simpler constructor
[simgrid.git] / src / kernel / routing / VivaldiZone.cpp
index 0cfec035970f153ba630b81143127b685d69c19a..05c24636fb0bdc1bb8aa6713d2b937b61a3a9d67 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2013-2021. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -76,9 +76,11 @@ void VivaldiZone::set_peer_link(NetPoint* netpoint, double bw_in, double bw_out,
   std::string link_up      = "link_" + netpoint->get_name() + "_UP";
   std::string link_down    = "link_" + netpoint->get_name() + "_DOWN";
   resource::LinkImpl* linkUp =
-      network_model_->create_link(link_up, std::vector<double>(1, bw_out), 0, s4u::Link::SharingPolicy::SHARED);
+      get_network_model()->create_link(link_up, std::vector<double>(1, bw_out), s4u::Link::SharingPolicy::SHARED);
+  linkUp->seal();
   resource::LinkImpl* linkDown =
-      network_model_->create_link(link_down, std::vector<double>(1, bw_in), 0, s4u::Link::SharingPolicy::SHARED);
+      get_network_model()->create_link(link_down, std::vector<double>(1, bw_in), s4u::Link::SharingPolicy::SHARED);
+  linkDown->seal();
   private_links_.insert({netpoint->id(), {linkUp, linkDown}});
 }