X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/5279f43fc9be71815091e79c76d5bc04c8c88421..4f8948b8f67d26726a2e53c9afe1a110c037ce4b:/communicator.cpp?ds=sidebyside 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()