-/* Copyright (c) 2014-2018. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2014-2019. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
((NetworkIBModel*)surf_network_model)->active_nodes.insert({host.get_name(), act});
}
-static void IB_action_state_changed_callback(simgrid::kernel::resource::NetworkAction* action)
+static void IB_action_state_changed_callback(simgrid::kernel::resource::NetworkAction* action,
+ simgrid::kernel::resource::Action::State /*previous*/)
{
using simgrid::kernel::resource::IBNode;
using simgrid::kernel::resource::NetworkIBModel;
if (from == to) // disregard local comms (should use loopback)
return;
- ActiveComm* comm = nullptr;
if (remove) {
if (to->ActiveCommsDown[from] == 1)
to->ActiveCommsDown.erase(from);
to->nbActiveCommsDown--;
for (std::vector<ActiveComm*>::iterator it = from->ActiveCommsUp.begin(); it != from->ActiveCommsUp.end(); ++it) {
if ((*it)->action == action) {
- comm = (*it);
+ delete *it;
from->ActiveCommsUp.erase(it);
break;
}
std::vector<bool> updated(active_nodes.size(), false);
updateIBfactors_rec(from, updated);
XBT_DEBUG("IB - Finished updating %d", from->id);
- delete comm;
}
}
}