aboutsummaryrefslogtreecommitdiff
path: root/src/dht
diff options
context:
space:
mode:
authorSupriti Singh <supritisingh08@gmail.com>2014-09-22 15:21:30 +0000
committerSupriti Singh <supritisingh08@gmail.com>2014-09-22 15:21:30 +0000
commit24690b956a481a848256df3a1b8bd6984779ce7f (patch)
treee4f30f7ed025ad8ecd093df490aa2f9e1a8a05d4 /src/dht
parent3a85995c4a7a48f7afae1c554e9df3547ca7db3f (diff)
downloadgnunet-24690b956a481a848256df3a1b8bd6984779ce7f.tar.gz
gnunet-24690b956a481a848256df3a1b8bd6984779ce7f.zip
X-Vine: Fixes
Diffstat (limited to 'src/dht')
-rw-r--r--src/dht/gnunet-service-xdht_neighbours.c2
-rw-r--r--src/dht/gnunet_dht_profiler.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/src/dht/gnunet-service-xdht_neighbours.c b/src/dht/gnunet-service-xdht_neighbours.c
index b36f7c657..c7e99c2e7 100644
--- a/src/dht/gnunet-service-xdht_neighbours.c
+++ b/src/dht/gnunet-service-xdht_neighbours.c
@@ -2413,7 +2413,6 @@ GDS_NEIGHBOURS_handle_get(const struct GNUNET_HashCode *key,
2413 struct Closest_Peer successor; 2413 struct Closest_Peer successor;
2414 struct GNUNET_PeerIdentity best_known_dest; 2414 struct GNUNET_PeerIdentity best_known_dest;
2415 struct GNUNET_HashCode intermediate_trail_id; 2415 struct GNUNET_HashCode intermediate_trail_id;
2416 struct GNUNET_PeerIdentity next_hop;
2417 uint64_t key_value; 2416 uint64_t key_value;
2418 2417
2419 memcpy (&key_value, key, sizeof (uint64_t)); 2418 memcpy (&key_value, key, sizeof (uint64_t));
@@ -2435,6 +2434,7 @@ GDS_NEIGHBOURS_handle_get(const struct GNUNET_HashCode *key,
2435 } 2434 }
2436 2435
2437#if ENABLE_MALICIOUS 2436#if ENABLE_MALICIOUS
2437 struct GNUNET_PeerIdentity next_hop;
2438 if (0 != GNUNET_CRYPTO_cmp_peer_identity (&successor.best_known_destination, 2438 if (0 != GNUNET_CRYPTO_cmp_peer_identity (&successor.best_known_destination,
2439 &successor.next_hop)) 2439 &successor.next_hop))
2440 { 2440 {
diff --git a/src/dht/gnunet_dht_profiler.c b/src/dht/gnunet_dht_profiler.c
index 592e31bfe..f23a22f07 100644
--- a/src/dht/gnunet_dht_profiler.c
+++ b/src/dht/gnunet_dht_profiler.c
@@ -1351,9 +1351,14 @@ test_run (void *cls,
1351 for (cnt = 0; cnt < num_peers && ac_cnt < n_active; cnt++) 1351 for (cnt = 0; cnt < num_peers && ac_cnt < n_active; cnt++)
1352 { 1352 {
1353 if ((GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 100) >= 1353 if ((GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 100) >=
1354 PUT_PROBABILITY) || (a_ctx[ac_cnt].mc != NULL)) 1354 PUT_PROBABILITY))
1355 continue; 1355 continue;
1356 1356
1357#if ENABLE_MALICIOUS
1358 if(a_ctx[ac_cnt].mc != NULL)
1359 continue;
1360#endif
1361
1357 a_ctx[cnt].ac = &a_ac[ac_cnt]; 1362 a_ctx[cnt].ac = &a_ac[ac_cnt];
1358 a_ac[ac_cnt].ctx = &a_ctx[cnt]; 1363 a_ac[ac_cnt].ctx = &a_ctx[cnt];
1359 ac_cnt++; 1364 ac_cnt++;