Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
none_get_route_and_latency must set latency to 0.
authornavarro <navarro@caraja.(none)>
Thu, 29 Mar 2012 12:16:16 +0000 (14:16 +0200)
committernavarro <navarro@caraja.(none)>
Thu, 29 Mar 2012 12:16:16 +0000 (14:16 +0200)
src/surf/surf_routing.c
src/surf/surf_routing_none.c

index d2de87b..6ce1552 100644 (file)
@@ -95,7 +95,7 @@ struct s_model_type routing_models[] = {
   {"DijkstraCache",
    "Dijkstra routing data (fast initialization, fast lookup, small memory requirements, shortest path routing only)",
    model_dijkstracache_create, model_dijkstra_both_end},
   {"DijkstraCache",
    "Dijkstra routing data (fast initialization, fast lookup, small memory requirements, shortest path routing only)",
    model_dijkstracache_create, model_dijkstra_both_end},
-  {"none", "No routing (usable with Constant network only)",
+  {"none", "No routing (Unless you know what you are doing, avoid using this mode in combination with a non Constant network model).",
    model_none_create,  NULL},
   {"RuleBased", "Rule-Based routing data (...)",
    model_rulebased_create, NULL},
    model_none_create,  NULL},
   {"RuleBased", "Rule-Based routing data (...)",
    model_rulebased_create, NULL},
index d4a598d..cc1ef3c 100644 (file)
@@ -15,6 +15,7 @@ static xbt_dynar_t none_get_onelink_routes(AS_t rc) {
 static void none_get_route_and_latency(AS_t rc, network_element_t src, network_element_t dst,
                                        route_t res,double *lat)
 {
 static void none_get_route_and_latency(AS_t rc, network_element_t src, network_element_t dst,
                                        route_t res,double *lat)
 {
+  *lat = 0.0;
 }
 
 static route_t none_get_bypass_route(AS_t rc,
 }
 
 static route_t none_get_bypass_route(AS_t rc,