X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/dad3d47f026798446da1d32d0d1607ffc35851cf..ff3ef77d2ef796e7e5e8c384672f3057997cec4b:/src/surf/network_interface.cpp diff --git a/src/surf/network_interface.cpp b/src/surf/network_interface.cpp index 7fdfce0d64..7391e1d8c4 100644 --- a/src/surf/network_interface.cpp +++ b/src/surf/network_interface.cpp @@ -216,8 +216,10 @@ void LinkImpl::setLatencyTrace(tmgr_trace_t trace) void NetworkAction::set_state(Action::State state) { + Action::State previous = get_state(); Action::set_state(state); - s4u::Link::on_communication_state_change(this); + if (previous != state) // Trigger only if the state changed + s4u::Link::on_communication_state_change(this); } /** @brief returns a list of all Links that this action is using */