Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / examples / msg / app-bittorrent / peer.h
index cca374b..d08f1f2 100644 (file)
@@ -18,7 +18,7 @@ typedef struct s_peer {
   int id;                       //peer id
 
   unsigned int bitfield;        //list of pieces the peer has.
-  unsigned long bitfield_blocks; //list of blocks the peer has.
+  unsigned long long bitfield_blocks; //list of blocks the peer has.
   short *pieces_count;          //number of peers that have each piece.
 
   unsigned int current_pieces;   //current pieces the peer is downloading
@@ -76,7 +76,7 @@ int partially_downloaded_piece(peer_t peer, connection_t remote_peer);
 
 void request_new_piece_to_peer(peer_t peer, connection_t remote_peer);
 void send_request_to_peer(peer_t peer, connection_t remote_peer, int piece);
-void remove_current_piece(peer_t peer, connection_t remote_peer, int current_piece);
+void remove_current_piece(peer_t peer, connection_t remote_peer, unsigned int current_piece);
 
 void update_active_peers_set(peer_t peer, connection_t remote_peer);
 int select_piece_to_download(peer_t peer, connection_t remote_peer);