aboutsummaryrefslogtreecommitdiff
path: root/src/rps/gnunet-service-rps.c
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2016-05-12 08:58:24 +0000
committerJulius Bünger <buenger@mytum.de>2016-05-12 08:58:24 +0000
commit9f4d6acdbb43a43b648568dee596320601d04db4 (patch)
tree6b6a969e7a87bea0a7423371974dadfc55077428 /src/rps/gnunet-service-rps.c
parent2ffa3a95dae5f16350dadb1a42bf78cbd47d5e80 (diff)
downloadgnunet-9f4d6acdbb43a43b648568dee596320601d04db4.tar.gz
gnunet-9f4d6acdbb43a43b648568dee596320601d04db4.zip
rps: keep track of valid peers in peermap
Diffstat (limited to 'src/rps/gnunet-service-rps.c')
-rw-r--r--src/rps/gnunet-service-rps.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 8f25b269d..8113e40b6 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -1385,7 +1385,7 @@ handle_peer_pull_reply (void *cls,
1385 /* Make sure we 'know' about this peer */ 1385 /* Make sure we 'know' about this peer */
1386 (void) Peers_insert_peer_check_liveliness (&peers[i]); 1386 (void) Peers_insert_peer_check_liveliness (&peers[i]);
1387 1387
1388 if (GNUNET_YES == Peers_check_peer_flag (&peers[i], Peers_VALID)) 1388 if (GNUNET_YES == Peers_check_peer_valid (&peers[i]))
1389 { 1389 {
1390 CustomPeerMap_put (pull_map, &peers[i]); 1390 CustomPeerMap_put (pull_map, &peers[i]);
1391 } 1391 }
@@ -1694,7 +1694,7 @@ do_mal_round (void *cls)
1694 * That is one push per round as it will ignore more. 1694 * That is one push per round as it will ignore more.
1695 */ 1695 */
1696 Peers_insert_peer_check_liveliness (&attacked_peer); 1696 Peers_insert_peer_check_liveliness (&attacked_peer);
1697 if (GNUNET_YES == Peers_check_peer_flag (&attacked_peer, Peers_VALID)) 1697 if (GNUNET_YES == Peers_check_peer_valid (&attacked_peer))
1698 send_push (&attacked_peer); 1698 send_push (&attacked_peer);
1699 } 1699 }
1700 1700
@@ -1706,7 +1706,7 @@ do_mal_round (void *cls)
1706 if (GNUNET_YES == Peers_check_peer_known (&attacked_peer)) 1706 if (GNUNET_YES == Peers_check_peer_known (&attacked_peer))
1707 { 1707 {
1708 Peers_insert_peer_check_liveliness (&attacked_peer); 1708 Peers_insert_peer_check_liveliness (&attacked_peer);
1709 if (GNUNET_YES == Peers_check_peer_flag (&attacked_peer, Peers_VALID)) 1709 if (GNUNET_YES == Peers_check_peer_valid (&attacked_peer))
1710 { 1710 {
1711 LOG (GNUNET_ERROR_TYPE_DEBUG, 1711 LOG (GNUNET_ERROR_TYPE_DEBUG,
1712 "Goding to send push to attacked peer (%s)\n", 1712 "Goding to send push to attacked peer (%s)\n",
@@ -2298,6 +2298,7 @@ run (void *cls,
2298 LOG (GNUNET_ERROR_TYPE_DEBUG, "Requesting peers from CADET\n"); 2298 LOG (GNUNET_ERROR_TYPE_DEBUG, "Requesting peers from CADET\n");
2299 GNUNET_CADET_get_peers (cadet_handle, &init_peer_cb, NULL); 2299 GNUNET_CADET_get_peers (cadet_handle, &init_peer_cb, NULL);
2300 // TODO send push/pull to each of those peers? 2300 // TODO send push/pull to each of those peers?
2301 // TODO read stored valid peers from last run
2301 2302
2302 peerinfo_notify_handle = GNUNET_PEERINFO_notify (cfg, 2303 peerinfo_notify_handle = GNUNET_PEERINFO_notify (cfg,
2303 GNUNET_NO, 2304 GNUNET_NO,