X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5b3677b425b9cc6949c1573d59ac772540cbf4b2..f26cd6685142f04fd0024837cd5251ceb34dbc41:/examples/msg/bittorrent/peer.c diff --git a/examples/msg/bittorrent/peer.c b/examples/msg/bittorrent/peer.c index 08f8727590..a614b0daf2 100644 --- a/examples/msg/bittorrent/peer.c +++ b/examples/msg/bittorrent/peer.c @@ -8,7 +8,7 @@ #include "tracker.h" #include "connection.h" #include "messages.h" -#include +#include #include #include @@ -242,7 +242,8 @@ void peer_init(peer_t peer, int id, int seed) peer->current_pieces = xbt_dynar_new(sizeof(int), NULL); - peer->stream = RngStream_CreateStream(""); + peer->stream = + (RngStream)MSG_host_get_property_value(MSG_host_self(), "stream"); peer->comm_received = NULL; peer->round = 0; @@ -266,8 +267,6 @@ void peer_free(peer_t peer) xbt_free(peer->pieces_count); xbt_free(peer->bitfield); xbt_free(peer->bitfield_blocks); - - RngStream_DeleteStream(&peer->stream); } /**