X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/37847073d272353f40d07e8d110b963488362efb..919edbcd087b9ad979957ea49c05d1453bab8e69:/src/surf/network.c diff --git a/src/surf/network.c b/src/surf/network.c index 51a46e1378..30792cfc24 100644 --- a/src/surf/network.c +++ b/src/surf/network.c @@ -537,12 +537,14 @@ static surf_action_t net_communicate(const char *src_name, Add a link_CM02_t *link and a int link_nb to network_card_CM02_t. It will represent local links for this node Use the cluster_id for ->id */ - xbt_dynar_t route = global_routing->get_route(src_name, dst_name); xbt_dynar_t back_route = NULL; int constraints_per_variable = 0; + // I will need this route for some time so let's call get_route_no_cleanup + xbt_dynar_t route = global_routing->get_route_no_cleanup(src_name, dst_name); + if (sg_network_fullduplex == 1) { - back_route = global_routing->get_route(src_name, dst_name); + back_route = global_routing->get_route(dst_name, src_name); } /* LARGE PLATFORMS HACK: @@ -658,6 +660,7 @@ static surf_action_t net_communicate(const char *src_name, strncpy(action->dst_name, dst_name, strlen(dst_name) + 1); #endif + xbt_dynar_free(&route); XBT_OUT; return (surf_action_t) action; @@ -770,7 +773,8 @@ static void surf_network_model_init_internal(void) net_link_new(xbt_strdup("__loopback__"), 498000000, NULL, 0.000015, NULL, SURF_RESOURCE_ON, NULL, - SURF_LINK_FATPIPE, NULL)); + SURF_LINK_FATPIPE, NULL), + (double_f_pvoid_t)net_get_link_latency); }