Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please sonar
[simgrid.git] / examples / c / app-bittorrent / bittorrent-peer.c
index a91d555..82698bf 100644 (file)
@@ -135,11 +135,10 @@ int get_peers_from_tracker(const_peer_t peer)
   }
 
   void* message           = NULL;
-  tracker_answer_t ta     = NULL;
   sg_comm_t comm_received = sg_mailbox_get_async(peer->mailbox, &message);
   res                     = sg_comm_wait_for(comm_received, GET_PEERS_TIMEOUT);
   if (res == SG_OK) {
-    ta = (tracker_answer_t)message;
+    const_tracker_answer_t ta = (const_tracker_answer_t)message;
     // Add the peers the tracker gave us to our peer list.
     unsigned i;
     int peer_id;