Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
port NS3 to the new signals in simgrid::Host
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 13 Jan 2016 13:44:37 +0000 (14:44 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 13 Jan 2016 13:44:37 +0000 (14:44 +0100)
src/surf/network_ns3.cpp

index 9ccded3..f637494 100644 (file)
@@ -39,11 +39,11 @@ static void replace_lat_ns3(char ** lat)
   xbt_free(temp);
 }
 
-static void simgrid_ns3_add_host(simgrid::surf::Host* host)
+static void simgrid_ns3_add_host(simgrid::Host& host)
 {
-  const char* id = host->getName();
+  const char* id = host.getName().c_str();
   XBT_DEBUG("NS3_ADD_HOST '%s'", id);
-  host->getHost()->extension_set(NS3_EXTENSION_ID, ns3_add_host(id));
+  host.extension_set(NS3_EXTENSION_ID, ns3_add_host(id));
 }
 
 static void parse_ns3_add_link(sg_platf_link_cbarg_t link)
@@ -230,7 +230,7 @@ static void parse_ns3_end_platform(void)
 
 static void define_callbacks_ns3(void)
 {
-  simgrid::surf::Host::onCreation.connect(simgrid_ns3_add_host);
+  simgrid::Host::onCreation.connect(simgrid_ns3_add_host);
   simgrid::surf::routingEdgeCreatedCallbacks.connect(simgrid_ns3_add_router);
   sg_platf_link_add_cb (&parse_ns3_add_link);
   sg_platf_cluster_add_cb (&parse_ns3_add_cluster);