X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/edde8f7fbc1b74a81551bf9eb7bac1935b999296..9f4ddf3b15fccdab0f2666bf44061e7fd8305f49:/src/surf/surf_routing_rulebased.c diff --git a/src/surf/surf_routing_rulebased.c b/src/surf/surf_routing_rulebased.c index b9fb8c4c6e..b4f3765f3a 100644 --- a/src/surf/surf_routing_rulebased.c +++ b/src/surf/surf_routing_rulebased.c @@ -8,7 +8,6 @@ /* Global vars */ extern routing_global_t global_routing; -extern xbt_dynar_t parsed_link_list; XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_rulebased, surf, "Routing part of surf"); @@ -74,8 +73,7 @@ static void model_rulebased_parse_PU(AS_t rc, const char *name) static void model_rulebased_parse_AS(AS_t rc, const char *name) { AS_rulebased_t routing = (AS_rulebased_t) rc; - xbt_dict_set(routing->dict_autonomous_systems, name, (void *) (-1), - NULL); + xbt_dict_set(routing->dict_autonomous_systems, name, (void *) (-1), NULL); } static void model_rulebased_parse_route(AS_t rc, @@ -340,7 +338,7 @@ static void rulebased_get_route_and_latency(AS_t rc, } else if (!strcmp(src, dst) && are_processing_units) { xbt_dynar_push(route->link_list, &(global_routing->loopback)); if (lat) - *lat += surf_network_model->extension.network.get_link_latency(link); + *lat += surf_network_model->extension.network.get_link_latency(global_routing->loopback); } else { THROWF(arg_error,0,"No route from '%s' to '%s'??",src,dst); //xbt_dynar_reset(route->link_list); @@ -397,8 +395,8 @@ AS_t model_rulebased_create(void) { new_component->generic_routing.get_bypass_route = rulebased_get_bypass_route; new_component->generic_routing.finalize = rulebased_finalize; /* initialization of internal structures */ - new_component->dict_processing_units = xbt_dict_new(); - new_component->dict_autonomous_systems = xbt_dict_new(); + new_component->dict_processing_units = xbt_dict_new_homogeneous(NULL); + new_component->dict_autonomous_systems = xbt_dict_new_homogeneous(NULL); new_component->list_route = xbt_dynar_new(sizeof(rule_route_t), &rule_route_free); new_component->list_ASroute = xbt_dynar_new(sizeof(rule_route_extended_t),