Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / examples / s4u / dht-chord / s4u_dht-chord.hpp
index 7ff0be3..095ea8c 100644 (file)
@@ -33,7 +33,7 @@ public:
 
   explicit HostChord(simgrid::s4u::Host* ptr) : host(ptr)
   {
-    std::string descr = std::string("RngSream<") + host->name() + ">";
+    std::string descr = std::string("RngSream<") + host->cname() + ">";
     stream_           = RngStream_CreateStream(descr.c_str());
   }
 
@@ -156,7 +156,9 @@ public:
       }
       now = simgrid::s4u::Engine::instance()->getClock();
     }
-
+    if (data != nullptr) {
+      delete static_cast<ChordMessage*>(data);
+    }
     // leave the ring
     leave();
   }