-/* Copyright (c) 2006-2014, 2026. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
int nextPeer;
do {
nextPeer = stream.randInt(0, peersList.size() - 1);
- } while (tTask.peers.contains(nextPeer));
+ } while (tTask.peers.contains(peersList.get(nextPeer)));
tTask.peers.add(peersList.get(nextPeer));
nbPeers++;
}
> [node-4.acme.org:app.bittorrent.Peer:(5) 0.000000] [jmsg/INFO] Hi, I'm joining the network with id 5
> [node-4.acme.org:app.bittorrent.Peer:(5) 5000.007806] [jmsg/INFO] Here is my current status: 1111111111
> [node-5.acme.org:app.bittorrent.Peer:(6) 0.000000] [jmsg/INFO] Hi, I'm joining the network with id 6
-> [node-5.acme.org:app.bittorrent.Peer:(6) 5000.039030] [jmsg/INFO] Here is my current status: 1111111111
+> [node-5.acme.org:app.bittorrent.Peer:(6) 5000.023418] [jmsg/INFO] Here is my current status: 1111111111
> [node-6.acme.org:app.bittorrent.Peer:(7) 0.000000] [jmsg/INFO] Hi, I'm joining the network with id 7
-> [node-6.acme.org:app.bittorrent.Peer:(7) 5000.031224] [jmsg/INFO] Here is my current status: 1111111111
+> [node-6.acme.org:app.bittorrent.Peer:(7) 5000.046836] [jmsg/INFO] Here is my current status: 1111111111
> [node-7.acme.org:app.bittorrent.Peer:(8) 0.000000] [jmsg/INFO] Hi, I'm joining the network with id 8
-> [node-7.acme.org:app.bittorrent.Peer:(8) 5000.046836] [jmsg/INFO] Here is my current status: 1111111111
+> [node-7.acme.org:app.bittorrent.Peer:(8) 5000.031224] [jmsg/INFO] Here is my current status: 1111111111