aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2015-06-20 13:48:23 +0000
committerJulius Bünger <buenger@mytum.de>2015-06-20 13:48:23 +0000
commit4d78632c575a118a2dc4c9194536a86b2fa00f76 (patch)
treee92e4e57293a37309fa9d9ff088028f3eee8a7f5 /src
parentc9f545f2ddd3fb733aa763b2d872f9ce35e2bccc (diff)
downloadgnunet-4d78632c575a118a2dc4c9194536a86b2fa00f76.tar.gz
gnunet-4d78632c575a118a2dc4c9194536a86b2fa00f76.zip
-fixed comparing of peer ids
Diffstat (limited to 'src')
-rw-r--r--src/rps/gnunet-service-rps.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 34501937d..23fdf2af5 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -1594,7 +1594,7 @@ handle_peer_pull_request (void *cls,
1594 1594
1595 else if (2 == mal_type) 1595 else if (2 == mal_type)
1596 { /* Try to partition network */ 1596 { /* Try to partition network */
1597 if (GNUNET_YES == GNUNET_CRYPTO_cmp_peer_identity (&attacked_peer, peer)) 1597 if (0 == GNUNET_CRYPTO_cmp_peer_identity (&attacked_peer, peer))
1598 { 1598 {
1599 send_pull_reply (peer, mal_peers, num_mal_peers); 1599 send_pull_reply (peer, mal_peers, num_mal_peers);
1600 } 1600 }
@@ -1705,8 +1705,8 @@ handle_peer_pull_reply (void *cls,
1705 &peers[i]) 1705 &peers[i])
1706 && GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (mal_peer_set, 1706 && GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (mal_peer_set,
1707 &peers[i]) 1707 &peers[i])
1708 && GNUNET_NO == GNUNET_CRYPTO_cmp_peer_identity (&peers[i], 1708 && 0 != GNUNET_CRYPTO_cmp_peer_identity (&peers[i],
1709 &own_identity)) 1709 &own_identity))
1710 { 1710 {
1711 tmp_att_peer = GNUNET_new (struct AttackedPeer); 1711 tmp_att_peer = GNUNET_new (struct AttackedPeer);
1712 tmp_att_peer->peer_id = peers[i]; 1712 tmp_att_peer->peer_id = peers[i];
@@ -1718,8 +1718,8 @@ handle_peer_pull_reply (void *cls,
1718 continue; 1718 continue;
1719 } 1719 }
1720 #endif /* ENABLE_MALICIOUS */ 1720 #endif /* ENABLE_MALICIOUS */
1721 if (GNUNET_YES != GNUNET_CRYPTO_cmp_peer_identity (&own_identity, 1721 if (0 != GNUNET_CRYPTO_cmp_peer_identity (&own_identity,
1722 &peers[i])) 1722 &peers[i]))
1723 { 1723 {
1724 peer_ctx = get_peer_ctx (peer_map, &peers[i]); 1724 peer_ctx = get_peer_ctx (peer_map, &peers[i]);
1725 if (GNUNET_YES == get_peer_flag (peer_ctx, VALID) || 1725 if (GNUNET_YES == get_peer_flag (peer_ctx, VALID) ||