diff options
author | Julius Bünger <buenger@mytum.de> | 2015-06-11 23:25:56 +0000 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2015-06-11 23:25:56 +0000 |
commit | d67d6d47727a91ed1767317f15f071abebfbdff7 (patch) | |
tree | f05e9d85b740ff1b3249f139e8da4583fce46263 | |
parent | bae032b55dc950aa6a2855104515c13b98fbb020 (diff) | |
download | gnunet-d67d6d47727a91ed1767317f15f071abebfbdff7.tar.gz gnunet-d67d6d47727a91ed1767317f15f071abebfbdff7.zip |
-fix hanling of pull replies
-rw-r--r-- | src/rps/gnunet-service-rps.c | 35 |
1 files 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, | |||
1724 | continue; | 1724 | continue; |
1725 | } | 1725 | } |
1726 | #endif /* ENABLE_MALICIOUS */ | 1726 | #endif /* ENABLE_MALICIOUS */ |
1727 | peer_ctx = get_peer_ctx (peer_map, &peers[i]); | 1727 | if (GNUNET_YES != GNUNET_CRYPTO_cmp_peer_identity (&own_identity, |
1728 | if (GNUNET_YES == get_peer_flag (peer_ctx, VALID) | 1728 | &peers[i])) |
1729 | || NULL != peer_ctx->send_channel | ||
1730 | || NULL != peer_ctx->recv_channel) | ||
1731 | { | 1729 | { |
1732 | if (GNUNET_NO == in_arr (pull_list, pull_list_size, &peers[i]) | 1730 | peer_ctx = get_peer_ctx (peer_map, &peers[i]); |
1733 | && 0 != GNUNET_CRYPTO_cmp_peer_identity (&own_identity, &peers[i])) | 1731 | if (GNUNET_YES == get_peer_flag (peer_ctx, VALID) || |
1734 | GNUNET_array_append (pull_list, pull_list_size, peers[i]); | 1732 | NULL != peer_ctx->send_channel || |
1735 | } | 1733 | NULL != peer_ctx->recv_channel) |
1736 | else if (GNUNET_NO == insert_in_pull_list_scheduled (peer_ctx)) | 1734 | { |
1737 | { | 1735 | if (GNUNET_NO == in_arr (pull_list, pull_list_size, &peers[i])) |
1738 | out_op.op = insert_in_pull_list; | 1736 | GNUNET_array_append (pull_list, pull_list_size, peers[i]); |
1739 | out_op.op_cls = NULL; | 1737 | } |
1740 | GNUNET_array_append (peer_ctx->outstanding_ops, | 1738 | else if (GNUNET_NO == insert_in_pull_list_scheduled (peer_ctx)) |
1741 | peer_ctx->num_outstanding_ops, | 1739 | { |
1742 | out_op); | 1740 | out_op.op = insert_in_pull_list; |
1743 | check_peer_live (peer_ctx); | 1741 | out_op.op_cls = NULL; |
1742 | GNUNET_array_append (peer_ctx->outstanding_ops, | ||
1743 | peer_ctx->num_outstanding_ops, | ||
1744 | out_op); | ||
1745 | check_peer_live (peer_ctx); | ||
1746 | } | ||
1744 | } | 1747 | } |
1745 | } | 1748 | } |
1746 | 1749 | ||