aboutsummaryrefslogtreecommitdiff
path: root/src/rps/gnunet-service-rps.c
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2019-02-21 16:42:27 +0100
committerJulius Bünger <buenger@mytum.de>2019-02-21 16:43:03 +0100
commitb4d534a55203bf2b12f834c40547c3860252dcdf (patch)
tree35e626825bf35b8316aa57c3856dc5556a8510f5 /src/rps/gnunet-service-rps.c
parent6795812d9db9bc981e62042447bdffbf2ee4a8d9 (diff)
downloadgnunet-b4d534a55203bf2b12f834c40547c3860252dcdf.tar.gz
gnunet-b4d534a55203bf2b12f834c40547c3860252dcdf.zip
RPS service: Adapt to coding guidelines (purely cosmetic)
Diffstat (limited to 'src/rps/gnunet-service-rps.c')
-rw-r--r--src/rps/gnunet-service-rps.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 35ed1022f..a06ed3907 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -2715,14 +2715,18 @@ clean_peer (struct Sub *sub,
2715 "Going to remove send channel to peer %s\n", 2715 "Going to remove send channel to peer %s\n",
2716 GNUNET_i2s (peer)); 2716 GNUNET_i2s (peer));
2717 #if ENABLE_MALICIOUS 2717 #if ENABLE_MALICIOUS
2718 if (0 != GNUNET_CRYPTO_cmp_peer_identity (&attacked_peer, peer)) 2718 if (0 != GNUNET_CRYPTO_cmp_peer_identity (&attacked_peer,
2719 (void) destroy_sending_channel (get_peer_ctx (sub->peer_map, peer)); 2719 peer))
2720 (void) destroy_sending_channel (get_peer_ctx (sub->peer_map,
2721 peer));
2720 #else /* ENABLE_MALICIOUS */ 2722 #else /* ENABLE_MALICIOUS */
2721 (void) destroy_sending_channel (get_peer_ctx (sub->peer_map, peer)); 2723 (void) destroy_sending_channel (get_peer_ctx (sub->peer_map,
2724 peer));
2722 #endif /* ENABLE_MALICIOUS */ 2725 #endif /* ENABLE_MALICIOUS */
2723 } 2726 }
2724 2727
2725 if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (sub->peer_map, peer)) 2728 if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (sub->peer_map,
2729 peer))
2726 { 2730 {
2727 /* Peer was already removed by callback on destroyed channel */ 2731 /* Peer was already removed by callback on destroyed channel */
2728 LOG (GNUNET_ERROR_TYPE_WARNING, 2732 LOG (GNUNET_ERROR_TYPE_WARNING,
@@ -3693,25 +3697,30 @@ handle_peer_pull_reply (void *cls,
3693 } 3697 }
3694 #endif /* ENABLE_MALICIOUS */ 3698 #endif /* ENABLE_MALICIOUS */
3695 /* Make sure we 'know' about this peer */ 3699 /* Make sure we 'know' about this peer */
3696 (void) insert_peer (channel_ctx->peer_ctx->sub, &peers[i]); 3700 (void) insert_peer (channel_ctx->peer_ctx->sub,
3701 &peers[i]);
3697 3702
3698 if (GNUNET_YES == check_peer_valid (channel_ctx->peer_ctx->sub->valid_peers, 3703 if (GNUNET_YES == check_peer_valid (channel_ctx->peer_ctx->sub->valid_peers,
3699 &peers[i])) 3704 &peers[i]))
3700 { 3705 {
3701 CustomPeerMap_put (channel_ctx->peer_ctx->sub->pull_map, &peers[i]); 3706 CustomPeerMap_put (channel_ctx->peer_ctx->sub->pull_map,
3707 &peers[i]);
3702 } 3708 }
3703 else 3709 else
3704 { 3710 {
3705 schedule_operation (channel_ctx->peer_ctx, 3711 schedule_operation (channel_ctx->peer_ctx,
3706 insert_in_pull_map, 3712 insert_in_pull_map,
3707 channel_ctx->peer_ctx->sub); /* cls */ 3713 channel_ctx->peer_ctx->sub); /* cls */
3708 (void) issue_peer_online_check (channel_ctx->peer_ctx->sub, &peers[i]); 3714 (void) issue_peer_online_check (channel_ctx->peer_ctx->sub,
3715 &peers[i]);
3709 } 3716 }
3710 } 3717 }
3711 3718
3712 UNSET_PEER_FLAG (get_peer_ctx (channel_ctx->peer_ctx->sub->peer_map, sender), 3719 UNSET_PEER_FLAG (get_peer_ctx (channel_ctx->peer_ctx->sub->peer_map,
3720 sender),
3713 Peers_PULL_REPLY_PENDING); 3721 Peers_PULL_REPLY_PENDING);
3714 clean_peer (channel_ctx->peer_ctx->sub, sender); 3722 clean_peer (channel_ctx->peer_ctx->sub,
3723 sender);
3715 3724
3716 GNUNET_break_op (check_peer_known (channel_ctx->peer_ctx->sub->peer_map, 3725 GNUNET_break_op (check_peer_known (channel_ctx->peer_ctx->sub->peer_map,
3717 sender)); 3726 sender));