X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1ad312703f930cfbf1fbf5cb5c4c28d2db3c4268..20cc28923476eb4affdb0eb6529cc1b3dfda6608:/src/surf/sg_platf.cpp diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index e1218f8afd..e493ca1b28 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -274,12 +274,9 @@ void sg_platf_new_cluster(simgrid::kernel::routing::ClusterCreationArgs* cluster // Add a router. XBT_DEBUG(" "); XBT_DEBUG("", 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)) {