X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/40dffe1f6c370e36f3e20ad82539e69b25cdcecd..599347b970dec2ad471021b8eecca62e8f0854e9:/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);