Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix bad pointer cast in the L07 model
authorGabriel Corona <gabriel.corona@loria.fr>
Mon, 25 Apr 2016 12:01:52 +0000 (14:01 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Mon, 25 Apr 2016 12:01:52 +0000 (14:01 +0200)
src/surf/ptask_L07.cpp

index 8d21b65..9a7179f 100644 (file)
@@ -152,8 +152,7 @@ void HostL07Model::updateActionsState(double /*now*/, double delta) {
 
       while ((cnst = lmm_get_cnst_from_var(maxminSystem_, action->getVariable(), i++))) {
         void *constraint_id = lmm_constraint_id(cnst);
-
-        if (static_cast<HostImpl*>(constraint_id)->isOff()) {
+        if (static_cast<simgrid::surf::Resource*>(constraint_id)->isOff()) {
           XBT_DEBUG("Action (%p) Failed!!", action);
           action->finish();
           action->setState(Action::State::failed);