]> AND Private Git Repository - loba.git/blobdiff - communicator.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Wip++...
[loba.git] / communicator.cpp
index 0c64b5b9e22869026db3043083ed27f5deec0b32..4b54161108fd6808bb47c8bb8b4ad6cbb163b045 100644 (file)
@@ -1,9 +1,10 @@
+#include "communicator.h"
+
 #include <algorithm>
 #include <tr1/functional>
 #include <sstream>
 #include <msg/msg.h>
 #include <xbt/log.h>
-#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()