Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[route parsing] make surf_network_resource_by_name public under name sg_routing_edge_...
[simgrid.git] / src / surf / surf_routing_full.c
index 1781b2f..776d2ed 100644 (file)
@@ -161,12 +161,8 @@ void model_full_set_route(AS_t rc, const char *src,
 {
   sg_routing_edge_t src_net_elm, dst_net_elm;
   int as_route = 0;
-  src_net_elm = xbt_lib_get_or_null(host_lib, src, ROUTING_HOST_LEVEL);
-  dst_net_elm = xbt_lib_get_or_null(host_lib, dst, ROUTING_HOST_LEVEL);
-  if (!src_net_elm)
-    src_net_elm = xbt_lib_get_or_null(as_router_lib, src, ROUTING_ASR_LEVEL);
-  if (!dst_net_elm)
-    dst_net_elm = xbt_lib_get_or_null(as_router_lib, dst, ROUTING_ASR_LEVEL);
+  src_net_elm = sg_routing_edge_by_name_or_null(src);
+  dst_net_elm = sg_routing_edge_by_name_or_null(dst);
 
   xbt_assert(src_net_elm, "Network elements %s not found", src);
   xbt_assert(dst_net_elm, "Network elements %s not found", dst);