diff options
Diffstat (limited to 'src/rps')
-rw-r--r-- | src/rps/gnunet-service-rps.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c index 63b530e85..4758478c1 100644 --- a/src/rps/gnunet-service-rps.c +++ b/src/rps/gnunet-service-rps.c | |||
@@ -2709,8 +2709,8 @@ remove_peer (struct Sub *sub, | |||
2709 | if (GNUNET_YES == check_peer_known (sub->peer_map, | 2709 | if (GNUNET_YES == check_peer_known (sub->peer_map, |
2710 | peer)) | 2710 | peer)) |
2711 | { | 2711 | { |
2712 | destroy_peer (get_peer_ctx (sub->peer_map, | 2712 | destroy_peer (get_peer_ctx (sub->peer_map, |
2713 | peer)); | 2713 | peer)); |
2714 | } | 2714 | } |
2715 | } | 2715 | } |
2716 | 2716 | ||
@@ -3811,7 +3811,8 @@ send_pull_request (struct PeerContext *peer_ctx) | |||
3811 | GNUNET_assert (GNUNET_NO == check_peer_flag (peer_ctx->sub->peer_map, | 3811 | GNUNET_assert (GNUNET_NO == check_peer_flag (peer_ctx->sub->peer_map, |
3812 | &peer_ctx->peer_id, | 3812 | &peer_ctx->peer_id, |
3813 | Peers_PULL_REPLY_PENDING)); | 3813 | Peers_PULL_REPLY_PENDING)); |
3814 | SET_PEER_FLAG (peer_ctx, Peers_PULL_REPLY_PENDING); | 3814 | SET_PEER_FLAG (peer_ctx, |
3815 | Peers_PULL_REPLY_PENDING); | ||
3815 | peer_ctx->round_pull_req = peer_ctx->sub->num_rounds; | 3816 | peer_ctx->round_pull_req = peer_ctx->sub->num_rounds; |
3816 | 3817 | ||
3817 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 3818 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
@@ -3819,7 +3820,9 @@ send_pull_request (struct PeerContext *peer_ctx) | |||
3819 | GNUNET_i2s (&peer_ctx->peer_id)); | 3820 | GNUNET_i2s (&peer_ctx->peer_id)); |
3820 | 3821 | ||
3821 | ev = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REQUEST); | 3822 | ev = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REQUEST); |
3822 | send_message (peer_ctx, ev, "PULL REQUEST"); | 3823 | send_message (peer_ctx, |
3824 | ev, | ||
3825 | "PULL REQUEST"); | ||
3823 | if (peer_ctx->sub) | 3826 | if (peer_ctx->sub) |
3824 | { | 3827 | { |
3825 | GNUNET_STATISTICS_update (stats, | 3828 | GNUNET_STATISTICS_update (stats, |
@@ -4386,7 +4389,7 @@ do_round (void *cls) | |||
4386 | } | 4389 | } |
4387 | // FIXME check bounds of histogram | 4390 | // FIXME check bounds of histogram |
4388 | sub->push_delta[(CustomPeerMap_size (sub->push_map) - | 4391 | sub->push_delta[(CustomPeerMap_size (sub->push_map) - |
4389 | sub->view_size_est_need) + | 4392 | (alpha * sub->view_size_est_need)) + |
4390 | (HISTOGRAM_FILE_SLOTS/2)]++; | 4393 | (HISTOGRAM_FILE_SLOTS/2)]++; |
4391 | if (sub == msub) | 4394 | if (sub == msub) |
4392 | { | 4395 | { |
@@ -4406,6 +4409,10 @@ do_round (void *cls) | |||
4406 | "# expected pushes", | 4409 | "# expected pushes", |
4407 | alpha * sub->view_size_est_need, | 4410 | alpha * sub->view_size_est_need, |
4408 | GNUNET_NO); | 4411 | GNUNET_NO); |
4412 | GNUNET_STATISTICS_set (stats, | ||
4413 | "delta expected - received pushes", | ||
4414 | CustomPeerMap_size (sub->push_map) - (alpha * sub->view_size_est_need), | ||
4415 | GNUNET_NO); | ||
4409 | } | 4416 | } |
4410 | 4417 | ||
4411 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 4418 | LOG (GNUNET_ERROR_TYPE_DEBUG, |