A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use signal to trace link usage
[simgrid.git]
/
src
/
surf
/
network_interface.cpp
diff --git
a/src/surf/network_interface.cpp
b/src/surf/network_interface.cpp
index
7fdfce0
..
7391e1d
100644
(file)
--- 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)
{
void NetworkAction::set_state(Action::State state)
{
+ Action::State previous = get_state();
Action::set_state(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 */
}
/** @brief returns a list of all Links that this action is using */