X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/bd2cf2d478d8e130e47a9b2943af0269b8da910a..1a5769a21ec60d1317bfe86f03860ceb552903aa:/src/surf/network_im.c diff --git a/src/surf/network_im.c b/src/surf/network_im.c index f53574adc2..aeded8147d 100644 --- a/src/surf/network_im.c +++ b/src/surf/network_im.c @@ -17,6 +17,8 @@ #include "surf_private.h" #include "xbt/dict.h" #include "maxmin_private.h" +#include "surf/surf_resource_lmm.h" + #undef GENERIC_ACTION #define GENERIC_ACTION(action) action->generic_action @@ -190,20 +192,20 @@ static void* im_net_create_resource(const char *name, static void im_net_parse_link_init(sg_platf_link_cbarg_t link) { - if(link->V_policy_initial_link == SURF_LINK_FULLDUPLEX) + if(link->policy == SURF_LINK_FULLDUPLEX) { - im_net_create_resource(bprintf("%s_UP",link->V_link_id), link->V_link_bandwidth, link->V_link_bandwidth_file, - link->V_link_latency, link->V_link_latency_file, link->V_link_state, link->V_link_state_file, - link->V_policy_initial_link, link->properties); - im_net_create_resource(bprintf("%s_DOWN",link->V_link_id), link->V_link_bandwidth, link->V_link_bandwidth_file, - link->V_link_latency, link->V_link_latency_file, link->V_link_state, link->V_link_state_file, - link->V_policy_initial_link, NULL); // FIXME: We need to deep copy the properties or we won't be able to free it + im_net_create_resource(bprintf("%s_UP",link->id), link->bandwidth, link->bandwidth_trace, + link->latency, link->latency_trace, link->state, link->state_trace, + link->policy, link->properties); + im_net_create_resource(bprintf("%s_DOWN",link->id), link->bandwidth, link->bandwidth_trace, + link->latency, link->latency_trace, link->state, link->state_trace, + link->policy, NULL); // FIXME: We need to deep copy the properties or we won't be able to free it } else { - im_net_create_resource(xbt_strdup(link->V_link_id), link->V_link_bandwidth, link->V_link_bandwidth_file, - link->V_link_latency, link->V_link_latency_file, link->V_link_state, link->V_link_state_file, - link->V_policy_initial_link, link->properties); + im_net_create_resource(xbt_strdup(link->id), link->bandwidth, link->bandwidth_trace, + link->latency, link->latency_trace, link->state, link->state_trace, + link->policy, link->properties); } } @@ -293,8 +295,7 @@ static int im_net_action_unref(surf_action_t action) #ifdef HAVE_TRACING xbt_free(((surf_action_network_CM02_im_t) action)->src_name); xbt_free(((surf_action_network_CM02_im_t) action)->dst_name); - if (action->category) - xbt_free(action->category); + xbt_free(action->category); #endif surf_action_free(&action); return 1; @@ -897,9 +898,6 @@ void im_surf_network_model_init_LegrandVelho(void) xbt_cfg_setdefault_double(_surf_cfg_set, "network/bandwidth_factor", 0.92); xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S", 8775); - - update_model_description(surf_network_model_description, - "LV08", surf_network_model); }