gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r35461 - gnunet/src/rps


From: gnunet
Subject: [GNUnet-SVN] r35461 - gnunet/src/rps
Date: Thu, 26 Mar 2015 13:12:09 +0100

Author: ch3
Date: 2015-03-26 13:12:09 +0100 (Thu, 26 Mar 2015)
New Revision: 35461

Modified:
   gnunet/src/rps/gnunet-service-rps.c
Log:
-cleaning up

Modified: gnunet/src/rps/gnunet-service-rps.c
===================================================================
--- gnunet/src/rps/gnunet-service-rps.c 2015-03-26 11:44:56 UTC (rev 35460)
+++ gnunet/src/rps/gnunet-service-rps.c 2015-03-26 12:12:09 UTC (rev 35461)
@@ -44,8 +44,6 @@
 
 // (TODO api -- possibility of getting weak random peer immideately)
 
-// TODO malicious peer
-
 // TODO connect to friends
 
 // TODO store peers somewhere
@@ -2149,6 +2147,7 @@
 shutdown_task (void *cls,
                     const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
+
   LOG (GNUNET_ERROR_TYPE_DEBUG, "RPS is going down\n");
 
   if (NULL != do_round_task)
@@ -2178,12 +2177,17 @@
   GNUNET_array_grow (push_list, push_list_size, 0);
   GNUNET_array_grow (pull_list, pull_list_size, 0);
   #ifdef ENABLE_MALICIOUS
+  struct AttackedPeer *tmp_att_peer;
   GNUNET_array_grow (mal_peers, num_mal_peers, 0);
   if (NULL != mal_peer_set)
     GNUNET_CONTAINER_multipeermap_destroy (mal_peer_set);
   if (NULL != att_peer_set)
     GNUNET_CONTAINER_multipeermap_destroy (att_peer_set);
-  // TODO empty attacked_peers DLL
+  while (NULL != att_peers_head)
+  {
+    tmp_att_peer = att_peers_head;
+    GNUNET_CONTAINER_DLL_remove (att_peers_head, att_peers_tail, tmp_att_peer);
+  }
   #endif /* ENABLE_MALICIOUS */
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]