Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill useless asserts: this is not the way routing logics will take to notice about...
[simgrid.git] / src / surf / surf_routing.c
index 7b4427c..a9630d2 100644 (file)
@@ -504,7 +504,6 @@ static void _get_route_and_latency(const char *src, const char *dst,
     e_route->link_list = xbt_dynar_new(global_routing->size_of_link, NULL);
 
     common_father->get_route(common_father, src, dst, e_route);
-    xbt_assert(e_route, "no route between \"%s\" and \"%s\"", src, dst);
     *route = e_route->link_list;
 
     if (latency)
@@ -561,22 +560,16 @@ static void _get_route_and_latency(const char *src, const char *dst,
 
   /* If source gateway is not our source, we have to recursively find our way up to this point */
   if (strcmp(src, e_route_cnt->src_gateway)) {
-    double latency_src;
     xbt_dynar_t route_src;
 
     _get_route_and_latency(src, e_route_cnt->src_gateway,
         (route ? &route_src : NULL),
-        (latency ? &latency_src : NULL));
+        latency);
 
-    xbt_assert(route_src, "no route between \"%s\" and \"%s\"",
-        src, e_route_cnt->src_gateway);
     xbt_dynar_foreach(route_src, cpt, link) {
       xbt_dynar_push(*route, &link);
     }
     xbt_dynar_free(&route_src);
-
-    if (latency)
-      *latency += latency_src;
   }
 
   xbt_dynar_foreach(e_route_cnt->link_list, cpt, link) {
@@ -585,22 +578,17 @@ static void _get_route_and_latency(const char *src, const char *dst,
 
   /* If dest gateway is not our destination, we have to recursively find our way from this point */
   if (strcmp(e_route_cnt->dst_gateway, dst)) {
-    double latency_dst;
     xbt_dynar_t route_dst;
 
     _get_route_and_latency(e_route_cnt->dst_gateway, dst,
         (route ? &route_dst : NULL),
-        (latency ? &latency_dst : NULL));
+        latency);
 
-    xbt_assert(route_dst, "no route between \"%s\" and \"%s\"",
-        e_route_cnt->dst_gateway, dst);
     xbt_dynar_foreach(route_dst, cpt, link) {
       xbt_dynar_push(*route, &link);
     }
     xbt_dynar_free(&route_dst);
 
-    if (latency)
-      *latency += latency_dst;
   }
 
   generic_free_route(e_route_cnt);