Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix (#220) ?
[simgrid.git] / src / mc / mc_base.cpp
index ed16b52..83a39e4 100644 (file)
@@ -102,10 +102,11 @@ bool actor_is_enabled(smx_actor_t actor)
     }
 
     case SIMCALL_COMM_WAITANY: {
-      xbt_dynar_t comms = simcall_comm_waitany__get__comms(req);
-      for (unsigned int index = 0; index < comms->used; ++index) {
-        simgrid::kernel::activity::CommImpl* act = xbt_dynar_get_as(comms, index, simgrid::kernel::activity::CommImpl*);
-        if (act->src_actor_ && act->dst_actor_)
+      simgrid::kernel::activity::CommImpl** comms = simcall_comm_waitany__get__comms(req);
+      size_t count                                = simcall_comm_waitany__get__count(req);
+      for (unsigned int index = 0; index < count; ++index) {
+        auto* comm = comms[index];
+        if (comm->src_actor_ && comm->dst_actor_)
           return true;
       }
       return false;