X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0bac7d0f735ac8ba47a46e1db4f6d7a7164fe0f2..be3d6e14a901f6df074da0498f3b45a261b75cb9:/src/surf/surf_routing.cpp diff --git a/src/surf/surf_routing.cpp b/src/surf/surf_routing.cpp index 433de56176..719d130698 100644 --- a/src/surf/surf_routing.cpp +++ b/src/surf/surf_routing.cpp @@ -23,8 +23,8 @@ namespace simgrid { namespace surf { -surf_callback(void, simgrid::surf::RoutingEdge*) routingEdgeCreatedCallbacks; -surf_callback(void, simgrid::surf::As*) asCreatedCallbacks; +simgrid::surf::signal routingEdgeCreatedCallbacks; +simgrid::surf::signal asCreatedCallbacks; } } @@ -35,9 +35,7 @@ surf_callback(void, simgrid::surf::As*) asCreatedCallbacks; */ xbt_dict_t host_list; -int SURF_HOST_LEVEL; //Surf host level int COORD_HOST_LEVEL=0; //Coordinates level -int NS3_HOST_LEVEL; //host node for ns3 int MSG_FILE_LEVEL; //Msg file level @@ -172,7 +170,8 @@ simgrid::surf::RoutingEdge *routing_add_host( SURF_NETWORK_ELEMENT_HOST, current_routing); routingEdge->setId(current_routing->parsePU(routingEdge)); - sg_host_edge_set(sg_host_by_name_or_create(host->id), routingEdge); + sg_host_t h = sg_host_by_name_or_create(host->id); + sg_host_edge_set(h, routingEdge); XBT_DEBUG("Having set name '%s' id '%d'", host->id, routingEdge->getId()); simgrid::surf::routingEdgeCreatedCallbacks(routingEdge); @@ -196,7 +195,7 @@ simgrid::surf::RoutingEdge *routing_add_host( } xbt_dynar_shrink(ctn, 0); xbt_dynar_free(&ctn_str); - simgrid::Host::get_host(host->id)->set_facet(COORD_HOST_LEVEL, (void *) ctn); + h->extension_set(COORD_HOST_LEVEL, (void *) ctn); XBT_DEBUG("Having set host coordinates for '%s'",host->id); } @@ -1339,7 +1338,7 @@ xbt_dynar_t surf_AS_get_hosts(simgrid::surf::As *as) for (int index = 0; index < count; index++) { sg_routing_edge_t relm = xbt_dynar_get_as(elms, index, simgrid::surf::RoutingEdge*); - sg_host_t delm = simgrid::Host::find_host(relm->getName()); + sg_host_t delm = simgrid::Host::by_name_or_null(relm->getName()); if (delm!=NULL) { xbt_dynar_push(res, &delm); }