X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1b947bf594dc981d2bd6798765f6700f98c0a20d..e8189846950b9f46f726ad4b7c06ff162feb7e2c:/src/kernel/activity/CommImpl.cpp diff --git a/src/kernel/activity/CommImpl.cpp b/src/kernel/activity/CommImpl.cpp index 0dc962a8f6..67ef311ab9 100644 --- a/src/kernel/activity/CommImpl.cpp +++ b/src/kernel/activity/CommImpl.cpp @@ -11,6 +11,7 @@ #define SIMIX_H_NO_DEPRECATED_WARNING // avoid deprecation warning on include (remove with XBT_ATTRIB_DEPRECATED_v333) #include +#include "src/kernel/EngineImpl.hpp" #include "src/kernel/activity/CommImpl.hpp" #include "src/kernel/activity/MailboxImpl.hpp" #include "src/kernel/actor/SimcallObserver.hpp" @@ -61,13 +62,17 @@ CommImpl& CommImpl::set_type(CommImplType type) CommImpl& CommImpl::set_source(s4u::Host* from) { + xbt_assert( from_ == nullptr ); from_ = from; + hosts_.push_back(from); return *this; } CommImpl& CommImpl::set_destination(s4u::Host* to) { + xbt_assert( to_ == nullptr ); to_ = to; + hosts_.push_back(to_); return *this; }