Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't try to push loopback if not defined.
authornavarro <navarro@caraja.(none)>
Mon, 12 Mar 2012 10:34:37 +0000 (11:34 +0100)
committernavarro <navarro@caraja.(none)>
Mon, 12 Mar 2012 11:19:40 +0000 (12:19 +0100)
src/surf/surf_routing_floyd.c
src/surf/surf_routing_full.c

index 4d71a22..b7a60a5 100644 (file)
@@ -200,7 +200,7 @@ void model_floyd_end(AS_t current_routing)
        }
 
        /* Add the loopback if needed */
-       if (current_routing->hierarchy == SURF_ROUTING_BASE) {
+       if (global_routing->loopback && current_routing->hierarchy == SURF_ROUTING_BASE) {
                for (i = 0; i < table_size; i++) {
                  route_t e_route = TO_FLOYD_LINK(i, i);
                  if (!e_route) {
index c4a4c9f..c752582 100644 (file)
@@ -138,7 +138,7 @@ void model_full_end(AS_t current_routing)
     routing->routing_table = xbt_new0(route_t, table_size * table_size);
 
   /* Add the loopback if needed */
-  if (current_routing->hierarchy == SURF_ROUTING_BASE) {
+  if (global_routing->loopback && current_routing->hierarchy == SURF_ROUTING_BASE) {
     for (i = 0; i < table_size; i++) {
       e_route = TO_ROUTE_FULL(i, i);
       if (!e_route) {