X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/beccaadce516fa7ae36bb08873dee6ef9c1d7a7f..4a8a9aee8b2d176fa6b207b030197c91a1030630:/src/instr/instr_interface.c diff --git a/src/instr/instr_interface.c b/src/instr/instr_interface.c index 13c3e39975..e49403ad3a 100644 --- a/src/instr/instr_interface.c +++ b/src/instr/instr_interface.c @@ -145,7 +145,15 @@ static void instr_user_srcdst_variable(double time, InstrUserVariable what) { xbt_dynar_t route=NULL; - routing_get_route_and_latency (src, dst, &route,NULL); + network_element_t src_elm = xbt_lib_get_or_null(host_lib,src,ROUTING_HOST_LEVEL); + if(!src_elm) src_elm = xbt_lib_get_or_null(as_router_lib,src,ROUTING_ASR_LEVEL); + if(!src_elm) xbt_die("Element '%s' not found!",src); + + network_element_t dst_elm = xbt_lib_get_or_null(host_lib,dst,ROUTING_HOST_LEVEL); + if(!dst_elm) dst_elm = xbt_lib_get_or_null(as_router_lib,dst,ROUTING_ASR_LEVEL); + if(!dst_elm) xbt_die("Element '%s' not found!",dst); + + routing_get_route_and_latency (src_elm, dst_elm, &route,NULL); unsigned int i; void *link; xbt_dynar_foreach (route, i, link) {