A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
assume a dumb tracker (and please travis)
[simgrid.git]
/
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
04bb2e4
..
79157bc
100644
(file)
--- 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;
}