Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
The test is always true
[simgrid.git] / src / surf / network.c
index b2887af..c9e0a70 100644 (file)
@@ -318,6 +318,9 @@ static int net_action_unref(surf_action_t action)
       surf_action_lmm_heap_remove(net_action_heap,(surf_action_lmm_t) action);
       xbt_swag_remove(action, net_modified_set);
     }
+#ifdef HAVE_TRACING
+    if (action->category) xbt_free (action->category);
+#endif
     surf_action_free(&action);
     return 1;
   }
@@ -535,7 +538,10 @@ static void net_update_actions_state_full(double now, double delta)
         link_CM02_t link = lmm_constraint_id(constraint);
         TRACE_surf_link_set_utilization(link->lmm_resource.generic_resource.name,
                                         ((surf_action_t)action)->category,
-                                        lmm_variable_getvalue(GENERIC_LMM_ACTION(action).variable),
+                                        (lmm_variable_getvalue(GENERIC_LMM_ACTION(action).variable)*
+                                        lmm_get_cnst_weight_from_var(network_maxmin_system,
+                                            GENERIC_LMM_ACTION(action).variable,
+                                            i)),
                                         now - delta,
                                         delta);
       }
@@ -596,7 +602,10 @@ static void net_update_actions_state_lazy(double now, double delta)
         link_CM02_t link = lmm_constraint_id(constraint);
         TRACE_surf_link_set_utilization(link->lmm_resource.generic_resource.name,
                                         ((surf_action_t)action)->category,
-                                        lmm_variable_getvalue(GENERIC_LMM_ACTION(action).variable),
+                                        (lmm_variable_getvalue(GENERIC_LMM_ACTION(action).variable)*
+                                            lmm_get_cnst_weight_from_var(network_maxmin_system,
+                                                GENERIC_LMM_ACTION(action).variable,
+                                                i)),
                                         GENERIC_LMM_ACTION(action).last_update,
                                         now - GENERIC_LMM_ACTION(action).last_update);
       }