-/* Copyright (c) 2012. The SimGrid Team.
+/* Copyright (c) 2012-2013. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* (since it couldn't have gotten more than 50 peers)
*/
send_handshake_all(peer);
- //Wait for at least one "bitfield" message.
-// wait_for_pieces(peer, deadline);
XBT_DEBUG("Starting main leech loop");
while (MSG_get_clock() < deadline && peer->pieces < FILE_PIECES) {
xbt_dict_size(peer->active_peers));
//update the current round
peer->round = (peer->round + 1) % 3;
- char *key, *key_choked;
+ char *key, *key_choked=NULL;
connection_t peer_choosed = NULL;
connection_t peer_choked = NULL;
//remove a peer from the list