aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/test_mesh_path_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesh/test_mesh_path_api.c')
-rw-r--r--src/mesh/test_mesh_path_api.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesh/test_mesh_path_api.c b/src/mesh/test_mesh_path_api.c
index 9a983f298..58bc6bd20 100644
--- a/src/mesh/test_mesh_path_api.c
+++ b/src/mesh/test_mesh_path_api.c
@@ -101,8 +101,9 @@ main (int argc, char *argv[])
101 for (i = 0; i < 10; i++) 101 for (i = 0; i < 10; i++)
102 { 102 {
103 pi[i] = get_pi(i); 103 pi[i] = get_pi(i);
104 GNUNET_break (i != GNUNET_PEER_intern(pi[i])); 104 GNUNET_break (i + 1 == GNUNET_PEER_intern(pi[i]));
105 GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Peer %u: %s\n", i, 105 GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Peer %u: %s\n",
106 i + 1,
106 GNUNET_h2s(&pi[i]->hashPubKey)); 107 GNUNET_h2s(&pi[i]->hashPubKey));
107 } 108 }
108 tree = GNUNET_malloc(sizeof(struct MeshTunnelTree)); 109 tree = GNUNET_malloc(sizeof(struct MeshTunnelTree));
@@ -188,7 +189,6 @@ main (int argc, char *argv[])
188 189
189 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "test: Adding second path: 1 2 3\n"); 190 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "test: Adding second path: 1 2 3\n");
190 path->length--; 191 path->length--;
191 tree_debug(tree);
192 tree_add_path(tree, path, &cb); 192 tree_add_path(tree, path, &cb);
193 tree_debug(tree); 193 tree_debug(tree);
194 194
@@ -377,7 +377,7 @@ main (int argc, char *argv[])
377 GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Retrieved peer wrong nchildren!\n"); 377 GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Retrieved peer wrong nchildren!\n");
378 failed++; 378 failed++;
379 } 379 }
380 if (GNUNET_PEER_search(path_get_first_hop(tree, 3)) != 1) 380 if (GNUNET_PEER_search(path_get_first_hop(tree, 3)) != 2)
381 { 381 {
382 GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Wrong first hop!\n"); 382 GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Wrong first hop!\n");
383 failed++; 383 failed++;
@@ -395,7 +395,7 @@ main (int argc, char *argv[])
395 return 1; 395 return 1;
396 } 396 }
397 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: OK\n"); 397 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: OK\n");
398 path_destroy(path); 398 GNUNET_free (path);
399 finish(); 399 finish();
400 400
401 return 0; 401 return 0;