From: Navarrop Date: Mon, 11 Apr 2011 13:57:36 +0000 (+0200) Subject: Verification of model Vivaldi and no link_ctn for route and AS_route. X-Git-Tag: v3.6_beta2~56 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/7684e4c9202e5160859052de1d6ec9509abcf98c?hp=e7a674ab548877a615a048135694d7169da51212 Verification of model Vivaldi and no link_ctn for route and AS_route. --- diff --git a/src/surf/surf_routing.c b/src/surf/surf_routing.c index d69877e320..78902504a8 100644 --- a/src/surf/surf_routing.c +++ b/src/surf/surf_routing.c @@ -2430,6 +2430,12 @@ static void model_rulebased_set_route(routing_component_t rc, rule_route_t ruleroute = xbt_new0(s_rule_route_t, 1); const char *error; int erroffset; + + if(!strcmp(rc->routing->name,"Vivaldi")){ + if(xbt_dynar_length(route->generic_route.link_list) != 0) + xbt_die("You can't have link_ctn with Model Vivaldi."); + } + ruleroute->re_src = pcre_compile(src, 0, &error, &erroffset, NULL); xbt_assert(ruleroute->re_src, "PCRE compilation failed at offset %d (\"%s\"): %s\n", @@ -2452,6 +2458,12 @@ static void model_rulebased_set_ASroute(routing_component_t rc, rule_route_extended_t ruleroute_e = xbt_new0(s_rule_route_extended_t, 1); const char *error; int erroffset; + + if(!strcmp(rc->routing->name,"Vivaldi")){ + if(xbt_dynar_length(route->generic_route.link_list) != 0) + xbt_die("You can't have link_ctn with Model Vivaldi."); + } + ruleroute_e->generic_rule_route.re_src = pcre_compile(src, 0, &error, &erroffset, NULL); xbt_assert(ruleroute_e->generic_rule_route.re_src,