X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f5792a3bf76ce15a573ae5e9c63097595ae5f2bd..5bcfa838aea9427c19940d2ceda34a1e7f75374b:/teshsuite/msg/app-bittorrent/bittorrent.c diff --git a/teshsuite/msg/app-bittorrent/bittorrent.c b/teshsuite/msg/app-bittorrent/bittorrent.c index 93b8e0e183..aebee13797 100644 --- a/teshsuite/msg/app-bittorrent/bittorrent.c +++ b/teshsuite/msg/app-bittorrent/bittorrent.c @@ -1,21 +1,16 @@ -/* 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. */ #include "bittorrent.h" -#include "peer.h" +#include "bittorrent-peer.h" #include "tracker.h" #include -#include /** Bittorrent example launcher */ int main(int argc, char* argv[]) { - msg_host_t host; - unsigned i; - MSG_init(&argc, argv); /* Check the arguments */ @@ -23,14 +18,6 @@ int main(int argc, char* argv[]) MSG_create_environment(argv[1]); - xbt_dynar_t host_list = MSG_hosts_as_dynar(); - 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); MSG_function_register("peer", peer); @@ -38,12 +25,5 @@ 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; }