From: Martin Quinson Date: Wed, 13 Jan 2016 13:44:37 +0000 (+0100) Subject: port NS3 to the new signals in simgrid::Host X-Git-Tag: v3_13~1260 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5ebe65e77d4e95add7d9b429cced2120849ea86e port NS3 to the new signals in simgrid::Host --- diff --git a/src/surf/network_ns3.cpp b/src/surf/network_ns3.cpp index 9ccded3a84..f637494675 100644 --- a/src/surf/network_ns3.cpp +++ b/src/surf/network_ns3.cpp @@ -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);