aboutsummaryrefslogtreecommitdiff
path: root/src/rps/gnunet-service-rps.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rps/gnunet-service-rps.c')
-rw-r--r--src/rps/gnunet-service-rps.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 832b3579a..e3ddb4bff 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -678,7 +678,7 @@ insert_in_sampler (void *cls, const struct GNUNET_PeerIdentity *peer)
678 if (0 < RPS_sampler_count_id (prot_sampler, peer)) 678 if (0 < RPS_sampler_count_id (prot_sampler, peer))
679 { 679 {
680 /* Make sure we 'know' about this peer */ 680 /* Make sure we 'know' about this peer */
681 (void) Peers_insert_peer (peer); 681 (void) Peers_insert_peer_check_liveliness (peer);
682 /* Establish a channel towards that peer to indicate we are going to send 682 /* Establish a channel towards that peer to indicate we are going to send
683 * messages to it */ 683 * messages to it */
684 Peers_indicate_sending_intention (peer); 684 Peers_indicate_sending_intention (peer);
@@ -1123,7 +1123,7 @@ handle_client_seed (void *cls,
1123 i, 1123 i,
1124 GNUNET_i2s (&peers[i])); 1124 GNUNET_i2s (&peers[i]));
1125 1125
1126 if (GNUNET_YES == Peers_insert_peer (&peers[i])) 1126 if (GNUNET_YES == Peers_insert_peer_check_liveliness (&peers[i]))
1127 { 1127 {
1128 Peers_schedule_operation (&peers[i], insert_in_sampler); 1128 Peers_schedule_operation (&peers[i], insert_in_sampler);
1129 Peers_schedule_operation (&peers[i], insert_in_view); 1129 Peers_schedule_operation (&peers[i], insert_in_view);
@@ -1371,7 +1371,7 @@ handle_peer_pull_reply (void *cls,
1371 &peers[i])) 1371 &peers[i]))
1372 { 1372 {
1373 /* Make sure we 'know' about this peer */ 1373 /* Make sure we 'know' about this peer */
1374 (void) Peers_insert_peer (&peers[i]); 1374 (void) Peers_insert_peer_check_liveliness (&peers[i]);
1375 1375
1376 if (GNUNET_YES == Peers_check_peer_flag (&peers[i], Peers_VALID)) 1376 if (GNUNET_YES == Peers_check_peer_flag (&peers[i], Peers_VALID))
1377 { 1377 {
@@ -1589,7 +1589,7 @@ handle_client_act_malicious (void *cls,
1589 /* Set the flag of the attacked peer to valid to avoid problems */ 1589 /* Set the flag of the attacked peer to valid to avoid problems */
1590 if (GNUNET_NO == Peers_check_peer_known (&attacked_peer)) 1590 if (GNUNET_NO == Peers_check_peer_known (&attacked_peer))
1591 { 1591 {
1592 Peers_insert_peer (&attacked_peer); 1592 Peers_insert_peer_check_liveliness (&attacked_peer);
1593 Peers_issue_peer_liveliness_check (&attacked_peer); 1593 Peers_issue_peer_liveliness_check (&attacked_peer);
1594 } 1594 }
1595 1595
@@ -1679,7 +1679,7 @@ do_mal_round (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1679 * Send as many pushes to the attacked peer as possible 1679 * Send as many pushes to the attacked peer as possible
1680 * That is one push per round as it will ignore more. 1680 * That is one push per round as it will ignore more.
1681 */ 1681 */
1682 Peers_insert_peer (&attacked_peer); 1682 Peers_insert_peer_check_liveliness (&attacked_peer);
1683 if (GNUNET_YES == Peers_check_peer_flag (&attacked_peer, Peers_VALID)) 1683 if (GNUNET_YES == Peers_check_peer_flag (&attacked_peer, Peers_VALID))
1684 send_push (&attacked_peer); 1684 send_push (&attacked_peer);
1685 } 1685 }
@@ -1691,7 +1691,7 @@ do_mal_round (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1691 /* Send PUSH to attacked peers */ 1691 /* Send PUSH to attacked peers */
1692 if (GNUNET_YES == Peers_check_peer_known (&attacked_peer)) 1692 if (GNUNET_YES == Peers_check_peer_known (&attacked_peer))
1693 { 1693 {
1694 Peers_insert_peer (&attacked_peer); 1694 Peers_insert_peer_check_liveliness (&attacked_peer);
1695 if (GNUNET_YES == Peers_check_peer_flag (&attacked_peer, Peers_VALID)) 1695 if (GNUNET_YES == Peers_check_peer_flag (&attacked_peer, Peers_VALID))
1696 { 1696 {
1697 LOG (GNUNET_ERROR_TYPE_DEBUG, 1697 LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -1703,7 +1703,7 @@ do_mal_round (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1703 Peers_issue_peer_liveliness_check (&attacked_peer); 1703 Peers_issue_peer_liveliness_check (&attacked_peer);
1704 } 1704 }
1705 else 1705 else
1706 Peers_insert_peer (&attacked_peer); 1706 Peers_insert_peer_check_liveliness (&attacked_peer);
1707 Peers_issue_peer_liveliness_check (&attacked_peer); 1707 Peers_issue_peer_liveliness_check (&attacked_peer);
1708 1708
1709 /* The maximum of pushes we're going to send this round */ 1709 /* The maximum of pushes we're going to send this round */
@@ -1995,7 +1995,7 @@ init_peer_cb (void *cls,
1995 LOG (GNUNET_ERROR_TYPE_DEBUG, 1995 LOG (GNUNET_ERROR_TYPE_DEBUG,
1996 "Got peer_id %s from cadet\n", 1996 "Got peer_id %s from cadet\n",
1997 GNUNET_i2s (peer)); 1997 GNUNET_i2s (peer));
1998 Peers_insert_peer (peer); 1998 Peers_insert_peer_check_liveliness (peer);
1999 Peers_schedule_operation (peer, insert_in_sampler); 1999 Peers_schedule_operation (peer, insert_in_sampler);
2000 Peers_schedule_operation (peer, insert_in_view); 2000 Peers_schedule_operation (peer, insert_in_view);
2001 } 2001 }
@@ -2021,7 +2021,7 @@ process_peerinfo_peers (void *cls,
2021 LOG (GNUNET_ERROR_TYPE_DEBUG, 2021 LOG (GNUNET_ERROR_TYPE_DEBUG,
2022 "Got peer_id %s from peerinfo\n", 2022 "Got peer_id %s from peerinfo\n",
2023 GNUNET_i2s (peer)); 2023 GNUNET_i2s (peer));
2024 Peers_insert_peer (peer); 2024 Peers_insert_peer_check_liveliness (peer);
2025 Peers_schedule_operation (peer, insert_in_sampler); 2025 Peers_schedule_operation (peer, insert_in_sampler);
2026 Peers_schedule_operation (peer, insert_in_view); 2026 Peers_schedule_operation (peer, insert_in_view);
2027 } 2027 }