X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d950afcf1affbcec73b9529b5d3c663064c2a8d8..9603bfd3cc9171236c3f77a23e40b62036ea4f06:/src/surf/surfxml_parse.c diff --git a/src/surf/surfxml_parse.c b/src/surf/surfxml_parse.c index 96c995ea58..89433f2738 100644 --- a/src/surf/surfxml_parse.c +++ b/src/surf/surfxml_parse.c @@ -121,7 +121,7 @@ double surf_parse_get_bandwidth(const char *string) { "MBps", 1e6 }, { "kBps", 1e3 }, { "Bps", 1.0 }, - { "", 1.0 }, /* default unit is bytes ber second */ + { "", 1.0 }, /* default unit is bytes per second */ { "Tibps", 0.125 * pow(1024, 4) }, { "Gibps", 0.125 * pow(1024, 3) }, { "Mibps", 0.125 * pow(1024, 2) }, @@ -677,17 +677,8 @@ void ETag_surfxml_ASroute(void){ ASroute.src = A_surfxml_ASroute_src; ASroute.dst = A_surfxml_ASroute_dst; - if (!strcmp(current_routing->model_desc->name,"RuleBased")) { - // DIRTY PERL HACK AHEAD: with the rulebased routing, the {src,dst}_gateway fields - // store the provided name instead of the entity directly (model_rulebased_parse_ASroute knows) - // - // This is because the user will provide something like "^AS_(.*)$" instead of the proper name of a given entity - ASroute.gw_src = (sg_routing_edge_t) A_surfxml_ASroute_gw___src; - ASroute.gw_dst = (sg_routing_edge_t) A_surfxml_ASroute_gw___dst; - } else { - ASroute.gw_src = sg_routing_edge_by_name_or_null(A_surfxml_ASroute_gw___src); - ASroute.gw_dst = sg_routing_edge_by_name_or_null(A_surfxml_ASroute_gw___dst); - } + ASroute.gw_src = sg_routing_edge_by_name_or_null(A_surfxml_ASroute_gw___src); + ASroute.gw_dst = sg_routing_edge_by_name_or_null(A_surfxml_ASroute_gw___dst); ASroute.link_list = parsed_link_list; @@ -729,17 +720,8 @@ void ETag_surfxml_bypassASroute(void){ ASroute.link_list = parsed_link_list; ASroute.symmetrical = FALSE; - if (!strcmp(current_routing->model_desc->name,"RuleBased")) { - // DIRTY PERL HACK AHEAD: with the rulebased routing, the {src,dst}_gateway fields - // store the provided name instead of the entity directly (model_rulebased_parse_ASroute knows) - // - // This is because the user will provide something like "^AS_(.*)$" instead of the proper name of a given entity - ASroute.gw_src = (sg_routing_edge_t) A_surfxml_bypassASroute_gw___src; - ASroute.gw_dst = (sg_routing_edge_t) A_surfxml_bypassASroute_gw___dst; - } else { - ASroute.gw_src = sg_routing_edge_by_name_or_null(A_surfxml_bypassASroute_gw___src); - ASroute.gw_dst = sg_routing_edge_by_name_or_null(A_surfxml_bypassASroute_gw___dst); - } + ASroute.gw_src = sg_routing_edge_by_name_or_null(A_surfxml_bypassASroute_gw___src); + ASroute.gw_dst = sg_routing_edge_by_name_or_null(A_surfxml_bypassASroute_gw___dst); sg_platf_new_bypassASroute(&ASroute); parsed_link_list = NULL;