Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove commented code from surf_routing_cluster
[simgrid.git] / examples / msg / bittorrent / peer.c
index 026be29d45965001351c36a24b6f050ff71ce489..2a9db33a5c43865cf2345910fab61825db60d2cd 100644 (file)
@@ -239,7 +239,7 @@ void peer_init(peer_t peer, int id, int seed)
   peer->current_pieces = xbt_dynar_new(sizeof(int), NULL);
   peer->current_piece = -1;
 
-  peer->stream = RngStream_CreateStream("");
+  peer->stream = MSG_host_get_data(MSG_host_self());
   peer->comm_received = NULL;
 
   peer->round = 0;
@@ -265,8 +265,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);
 }
 
 /**