From d67d6d47727a91ed1767317f15f071abebfbdff7 Mon Sep 17 00:00:00 2001 From: Julius Bünger Date: Thu, 11 Jun 2015 23:25:56 +0000 Subject: -fix hanling of pull replies --- src/rps/gnunet-service-rps.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c index 03325da31..b8d865b57 100644 --- a/src/rps/gnunet-service-rps.c +++ b/src/rps/gnunet-service-rps.c @@ -1724,23 +1724,26 @@ handle_peer_pull_reply (void *cls, continue; } #endif /* ENABLE_MALICIOUS */ - peer_ctx = get_peer_ctx (peer_map, &peers[i]); - if (GNUNET_YES == get_peer_flag (peer_ctx, VALID) - || NULL != peer_ctx->send_channel - || NULL != peer_ctx->recv_channel) + if (GNUNET_YES != GNUNET_CRYPTO_cmp_peer_identity (&own_identity, + &peers[i])) { - if (GNUNET_NO == in_arr (pull_list, pull_list_size, &peers[i]) - && 0 != GNUNET_CRYPTO_cmp_peer_identity (&own_identity, &peers[i])) - GNUNET_array_append (pull_list, pull_list_size, peers[i]); - } - else if (GNUNET_NO == insert_in_pull_list_scheduled (peer_ctx)) - { - out_op.op = insert_in_pull_list; - out_op.op_cls = NULL; - GNUNET_array_append (peer_ctx->outstanding_ops, - peer_ctx->num_outstanding_ops, - out_op); - check_peer_live (peer_ctx); + peer_ctx = get_peer_ctx (peer_map, &peers[i]); + if (GNUNET_YES == get_peer_flag (peer_ctx, VALID) || + NULL != peer_ctx->send_channel || + NULL != peer_ctx->recv_channel) + { + if (GNUNET_NO == in_arr (pull_list, pull_list_size, &peers[i])) + GNUNET_array_append (pull_list, pull_list_size, peers[i]); + } + else if (GNUNET_NO == insert_in_pull_list_scheduled (peer_ctx)) + { + out_op.op = insert_in_pull_list; + out_op.op_cls = NULL; + GNUNET_array_append (peer_ctx->outstanding_ops, + peer_ctx->num_outstanding_ops, + out_op); + check_peer_live (peer_ctx); + } } } -- cgit v1.2.3