Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Give the _this_ variants to the Link signals
[simgrid.git] / src / s4u / s4u_Link.cpp
index 4280066..d64a457 100644 (file)
@@ -137,11 +137,19 @@ double Link::get_load() const
 
 void Link::turn_on()
 {
-  kernel::actor::simcall_answered([this]() { this->pimpl_->turn_on(); });
+  kernel::actor::simcall_answered([this]() {
+    this->pimpl_->turn_on();
+    on_state_change(*this);
+    on_this_state_change(*this);
+  });
 }
 void Link::turn_off()
 {
-  kernel::actor::simcall_answered([this]() { this->pimpl_->turn_off(); });
+  kernel::actor::simcall_answered([this]() {
+    this->pimpl_->turn_off();
+    on_state_change(*this);
+    on_this_state_change(*this);
+  });
 }
 Link* Link::seal()
 {