Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
ns3: get ride of the node_num field, that was only used to obfuscate the debug messages
[simgrid.git] / src / surf / sg_platf.cpp
index e1218f8..e493ca1 100644 (file)
@@ -274,12 +274,9 @@ void sg_platf_new_cluster(simgrid::kernel::routing::ClusterCreationArgs* cluster
   // Add a router.
   XBT_DEBUG(" ");
   XBT_DEBUG("<router id=\"%s\"/>", cluster->router_id.c_str());
-  if (cluster->router_id.empty()) {
-    std::string newid   = std::string(cluster->prefix) + cluster->id + "_router" + cluster->suffix;
-    current_as->router_ = sg_platf_new_router(newid, NULL);
-  } else {
-    current_as->router_ = sg_platf_new_router(cluster->router_id, NULL);
-  }
+  if (cluster->router_id.empty())
+    cluster->router_id = std::string(cluster->prefix) + cluster->id + "_router" + cluster->suffix;
+  current_as->router_ = sg_platf_new_router(cluster->router_id, NULL);
 
   //Make the backbone
   if ((cluster->bb_bw > 0) || (cluster->bb_lat > 0)) {