Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Try to fix a compiler error seen on Flag2 job of jenkins
[simgrid.git] / examples / c / app-bittorrent / bittorrent-peer.h
index b1a88fbab6e074d017776feddb6a274649a31a13..7757e668bcd89f4186fae46adead518b2b095097 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2020. The SimGrid Team.
+/* Copyright (c) 2012-2023. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -31,7 +31,6 @@ typedef s_connection_t* connection_t;
 typedef const s_connection_t* const_connection_t;
 
 connection_t connection_new(int id);
-void connection_free(void* data);
 void connection_add_speed_value(connection_t connection, double speed);
 int connection_has_piece(const_connection_t connection, unsigned int piece);
 
@@ -58,7 +57,7 @@ typedef s_peer_t* peer_t;
 typedef const s_peer_t* const_peer_t;
 
 /** Peer main function */
-void peer(int argc, char* argv[]);
+void peer_run(int argc, char* argv[]);
 
 int get_peers_from_tracker(const_peer_t peer);
 void send_handshake_to_all_peers(const_peer_t peer);
@@ -68,13 +67,13 @@ void send_piece(const_peer_t peer, sg_mailbox_t mailbox, int piece, int block_in
 void send_have_to_all_peers(const_peer_t peer, int piece);
 void send_request_to_peer(const_peer_t peer, connection_t remote_peer, int piece);
 
-void get_status(char** status, unsigned int bitfield);
+void get_status(char* status, unsigned int bitfield);
 int has_finished(unsigned int bitfield);
 int is_interested(const_peer_t peer, const_connection_t remote_peer);
 int is_interested_and_free(const_peer_t peer, const_connection_t remote_peer);
 void update_pieces_count_from_bitfield(const_peer_t peer, unsigned int bitfield);
 
-int count_pieces(unsigned int bitfield);
+unsigned int count_pieces(unsigned int bitfield);
 int nb_interested_peers(const_peer_t peer);
 
 void leech(peer_t peer);