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

Private GIT Repository
Improve help message.
[loba.git] / neighbor.cpp
index e7a4666151df22ecc771ef1c9c883cfdb8e4f0ec..3340f8f49678998415d94a3fb9f5b83f43b6128d 100644 (file)
@@ -1,18 +1,16 @@
-#include <xbt/sysdep.h>
 #include "neighbor.h"
 
+#include <limits>
+#include <msg/msg.h>
+
 neighbor::neighbor(const char* hostname)
+    : host((hostdata* )MSG_host_get_data(MSG_get_host_by_name(hostname)))
+    , load(std::numeric_limits<double>::infinity())
+    , debt(0.0)
+    , to_send(0.0)
 {
-    load = std::numeric_limits<double>::infinity();
-    debt = 0.0;
-    name = xbt_strdup(hostname);
-    ctrl_mbox = bprintf("%s_ctrl", hostname);
-    data_mbox = bprintf("%s_data", hostname);
 }
 
 neighbor::~neighbor()
 {
-    free(data_mbox);
-    free(ctrl_mbox);
-    free(name);
 }