X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/47b38aa12761cc26a9bb3030532e8efc3c924bf4..d0eb42a2080d1645f465c7fefbab948ab31ef03e:/src/surf/surf_routing_full.c diff --git a/src/surf/surf_routing_full.c b/src/surf/surf_routing_full.c index bafd2faeeb..acee99d33f 100644 --- a/src/surf/surf_routing_full.c +++ b/src/surf/surf_routing_full.c @@ -161,10 +161,12 @@ void model_full_set_route(AS_t rc, const char *src, { network_element_t src_net_elm, dst_net_elm; - src_net_elm = (network_element_t)xbt_lib_get_or_null(host_lib, src, ROUTING_HOST_LEVEL); - dst_net_elm = (network_element_t)xbt_lib_get_or_null(host_lib, dst, ROUTING_HOST_LEVEL); - if(!src_net_elm) src_net_elm = (network_element_t)xbt_lib_get_or_null(as_router_lib, src, ROUTING_ASR_LEVEL); - if(!dst_net_elm) dst_net_elm = (network_element_t)xbt_lib_get_or_null(as_router_lib, dst, ROUTING_ASR_LEVEL); + 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); xbt_assert(src_net_elm, "Network elements %s not found", src); xbt_assert(dst_net_elm, "Network elements %s not found", dst);