From 5ebe65e77d4e95add7d9b429cced2120849ea86e Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Wed, 13 Jan 2016 14:44:37 +0100 Subject: [PATCH] port NS3 to the new signals in simgrid::Host --- src/surf/network_ns3.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); -- 2.20.1