X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/f620be5869815a0dccd5b37089c2ee91399915e4..c771a55e40d2a41d607a0da1b67cd1f7d546ccc8:/communicator.cpp diff --git a/communicator.cpp b/communicator.cpp index 0c64b5b..4b54161 100644 --- a/communicator.cpp +++ b/communicator.cpp @@ -1,9 +1,10 @@ +#include "communicator.h" + #include #include #include #include #include -#include "communicator.h" #include "simgrid_features.h" #include "misc.h" @@ -21,20 +22,14 @@ std::string message::to_string() } communicator::communicator() + : host((hostdata* )MSG_host_get_data(MSG_host_self())) + , ctrl_task(NULL) + , ctrl_comm(NULL) + , ctrl_close_is_last(false) + , data_task(NULL) + , data_comm(NULL) + , data_close_is_last(false) { - const char* hostname = MSG_host_get_name(MSG_host_self()); - - ctrl_mbox = hostname; - ctrl_mbox += "_ctrl"; - ctrl_task = NULL; - ctrl_comm = NULL; - ctrl_close_is_last = false; - - data_mbox = hostname; - data_mbox += "_data"; - data_task = NULL; - data_comm = NULL; - data_close_is_last = false; } communicator::~communicator()