X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/839cf5b25325b4894201c51924605ecc0ddc84c7..4ffc087f0ea28fee6fb1d70b37995e64dd2d3575:/examples/s4u/app-bittorrent/s4u_peer.cpp diff --git a/examples/s4u/app-bittorrent/s4u_peer.cpp b/examples/s4u/app-bittorrent/s4u_peer.cpp index 04bb2e4074..79157bc9a5 100644 --- a/examples/s4u/app-bittorrent/s4u_peer.cpp +++ b/examples/s4u/app-bittorrent/s4u_peer.cpp @@ -88,7 +88,7 @@ bool Peer::getPeersFromTracker() { simgrid::s4u::MailboxPtr tracker_mailbox = simgrid::s4u::Mailbox::byName(TRACKER_MAILBOX); // Build the task to send to the tracker - TrackerQuery* peer_request = new TrackerQuery(id, mailbox_, 0, 0, FILE_SIZE); + TrackerQuery* peer_request = new TrackerQuery(id, mailbox_); try { XBT_DEBUG("Sending a peer request to the tracker."); tracker_mailbox->put(peer_request, TRACKER_COMM_SIZE, GET_PEERS_TIMEOUT); @@ -657,7 +657,7 @@ bool Peer::hasCompletedPiece(unsigned int piece) int Peer::getFirstMissingBlockFrom(int piece) { for (unsigned int i = 0; i < PIECES_BLOCKS; i++) - if (!(bitfield_blocks & 1ULL << (piece * PIECES_BLOCKS + i))) + if (not(bitfield_blocks & 1ULL << (piece * PIECES_BLOCKS + i))) return i; return -1; }