X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c290f6e5704d8d1e227fc32720676a2613d5d51c..273148e36d46d15113195eae98cb45aca71f07d5:/src/surf/network_constant.cpp diff --git a/src/surf/network_constant.cpp b/src/surf/network_constant.cpp index 41a3385f4d..26ae955581 100644 --- a/src/surf/network_constant.cpp +++ b/src/surf/network_constant.cpp @@ -59,8 +59,7 @@ void NetworkConstantModel::update_actions_state(double /*now*/, double delta) } } action.update_remains(action.get_cost() * delta / action.initial_latency_); - if (action.get_max_duration() != NO_MAX_DURATION) - action.update_max_duration(delta); + action.update_max_duration(delta); if ((action.get_remains_no_update() <= 0) || ((action.get_max_duration() != NO_MAX_DURATION) && (action.get_max_duration() <= 0))) { @@ -73,7 +72,7 @@ kernel::resource::Action* NetworkConstantModel::communicate(s4u::Host* src, s4u: { NetworkConstantAction* action = new NetworkConstantAction(this, size, sg_latency_factor); - simgrid::s4u::Link::on_communicate(action, src, dst); + simgrid::s4u::Link::on_communicate(*action, src, dst); return action; }