X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ff498d2432d650dc50282b04e3bd175a588eef8c..f8498e93073ae2ad6e6e19571ecf52c9104edbd0:/src/kernel/activity/CommImpl.cpp diff --git a/src/kernel/activity/CommImpl.cpp b/src/kernel/activity/CommImpl.cpp index 5f1998093f..8aa5747069 100644 --- a/src/kernel/activity/CommImpl.cpp +++ b/src/kernel/activity/CommImpl.cpp @@ -218,7 +218,7 @@ void simcall_HANDLER_comm_wait(smx_simcall_t simcall, simgrid::kernel::activity: comm->finish(); } else { /* we need a sleep action (even when there is no timeout) to be notified of host failures */ simgrid::kernel::resource::Action* sleep = simcall->issuer->get_host()->pimpl_cpu->sleep(timeout); - sleep->set_data(comm); + sleep->set_activity(comm); if (simcall->issuer == comm->src_actor_) comm->src_timeout_ = sleep; @@ -422,7 +422,7 @@ CommImpl* CommImpl::start() s4u::Host* receiver = dst_actor_->get_host(); surf_action_ = surf_network_model->communicate(sender, receiver, size_, rate_); - surf_action_->set_data(this); + surf_action_->set_activity(this); surf_action_->set_category(get_tracing_category()); state_ = SIMIX_RUNNING; @@ -520,10 +520,7 @@ void CommImpl::cancel() /** @brief This is part of the cleanup process, probably an internal command */ void CommImpl::cleanupSurf() { - if (surf_action_) { - surf_action_->unref(); - surf_action_ = nullptr; - } + clean_action(); if (src_timeout_) { src_timeout_->unref();