Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[CR] Minor improvement.
[simgrid.git] / src / surf / network_cm02.cpp
index 753f2a6..3dc1bd7 100644 (file)
@@ -12,7 +12,6 @@
 #include "src/kernel/resource/profile/Event.hpp"
 #include "src/surf/network_wifi.hpp"
 #include "src/surf/surf_interface.hpp"
-#include "surf/surf.hpp"
 
 #include <algorithm>
 #include <numeric>
@@ -438,7 +437,6 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz
   comm_action_expand_constraints(src, dst, action, route, back_route);
   XBT_OUT();
 
-  simgrid::s4u::Link::on_communicate(*action);
   return action;
 }
 
@@ -464,12 +462,12 @@ void NetworkCm02Link::apply_event(kernel::profile::Event* triggered, double valu
     set_latency(value);
     tmgr_trace_event_unref(&latency_.event);
 
-  } else if (triggered == state_event_) {
+  } else if (triggered == get_state_event()) {
     if (value > 0)
       turn_on();
     else
       turn_off();
-    tmgr_trace_event_unref(&state_event_);
+    unref_state_event();
   } else {
     xbt_die("Unknown event!\n");
   }