Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Endgame mode is always enabled, remove option.
[simgrid.git] / teshsuite / msg / app-bittorrent / bittorrent.c
index 7cad511..d278ae0 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2012-2017. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2012-2019. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -8,7 +7,8 @@
 #include "bittorrent-peer.h"
 #include "tracker.h"
 #include <simgrid/msg.h>
-#include <xbt/RngStream.h>
+
+#include <stdio.h> /* snprintf */
 
 /** Bittorrent example launcher */
 int main(int argc, char* argv[])
@@ -27,8 +27,6 @@ int main(int argc, char* argv[])
   xbt_dynar_foreach (host_list, i, host) {
     char descr[512];
     snprintf(descr, sizeof descr, "RngSream<%s>", MSG_host_get_name(host));
-    RngStream stream = RngStream_CreateStream(descr);
-    MSG_host_set_data(host, stream);
   }
 
   MSG_function_register("tracker", tracker);
@@ -38,11 +36,6 @@ int main(int argc, char* argv[])
 
   MSG_main();
 
-  xbt_dynar_foreach (host_list, i, host) {
-    RngStream stream = (RngStream)MSG_host_get_data(host);
-    RngStream_DeleteStream(&stream);
-    MSG_host_set_data(host, NULL);
-  }
   xbt_dynar_free(&host_list);
 
   return 0;