diff options
Diffstat (limited to 'src/lib/testing/testing_api_topology.c')
-rw-r--r-- | src/lib/testing/testing_api_topology.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/lib/testing/testing_api_topology.c b/src/lib/testing/testing_api_topology.c index c554fb743..7221d4f39 100644 --- a/src/lib/testing/testing_api_topology.c +++ b/src/lib/testing/testing_api_topology.c | |||
@@ -310,7 +310,8 @@ get_connect_value (const char *line, | |||
310 | * struct GNUNET_TESTING_NodeConnection will be added. | 310 | * struct GNUNET_TESTING_NodeConnection will be added. |
311 | */ | 311 | */ |
312 | static void | 312 | static void |
313 | node_connections (const char *line, struct GNUNET_TESTING_NetjailNode *node) | 313 | node_connections (const char *line, |
314 | struct GNUNET_TESTING_NetjailNode *node) | ||
314 | { | 315 | { |
315 | char *value, *value2; | 316 | char *value, *value2; |
316 | char *temp; | 317 | char *temp; |
@@ -319,7 +320,6 @@ node_connections (const char *line, struct GNUNET_TESTING_NetjailNode *node) | |||
319 | char *rest2 = NULL; | 320 | char *rest2 = NULL; |
320 | struct GNUNET_TESTING_NodeConnection *node_connection; | 321 | struct GNUNET_TESTING_NodeConnection *node_connection; |
321 | 322 | ||
322 | |||
323 | temp = strstr (line, "connect"); | 323 | temp = strstr (line, "connect"); |
324 | if (NULL != temp) | 324 | if (NULL != temp) |
325 | { | 325 | { |
@@ -363,7 +363,9 @@ node_connections (const char *line, struct GNUNET_TESTING_NetjailNode *node) | |||
363 | * return GNUNET_YES to continue with iterating, GNUNET_NO otherwise. | 363 | * return GNUNET_YES to continue with iterating, GNUNET_NO otherwise. |
364 | */ | 364 | */ |
365 | static int | 365 | static int |
366 | log_nodes (void *cls, const struct GNUNET_ShortHashCode *id, void *value) | 366 | log_nodes (void *cls, |
367 | const struct GNUNET_ShortHashCode *id, | ||
368 | void *value) | ||
367 | { | 369 | { |
368 | struct GNUNET_TESTING_NetjailNode *node = value; | 370 | struct GNUNET_TESTING_NetjailNode *node = value; |
369 | struct GNUNET_TESTING_NodeConnection *pos_connection; | 371 | struct GNUNET_TESTING_NodeConnection *pos_connection; |
@@ -408,11 +410,15 @@ log_nodes (void *cls, const struct GNUNET_ShortHashCode *id, void *value) | |||
408 | * return GNUNET_YES to continue with iterating, GNUNET_NO otherwise. | 410 | * return GNUNET_YES to continue with iterating, GNUNET_NO otherwise. |
409 | */ | 411 | */ |
410 | static int | 412 | static int |
411 | log_namespaces (void *cls, const struct GNUNET_ShortHashCode *id, void *value) | 413 | log_namespaces (void *cls, |
414 | const struct GNUNET_ShortHashCode *id, | ||
415 | void *value) | ||
412 | { | 416 | { |
413 | struct GNUNET_TESTING_NetjailNamespace *namespace = value; | 417 | struct GNUNET_TESTING_NetjailNamespace *namespace = value; |
414 | 418 | ||
415 | GNUNET_CONTAINER_multishortmap_iterate (namespace->nodes, &log_nodes, NULL); | 419 | GNUNET_CONTAINER_multishortmap_iterate (namespace->nodes, |
420 | &log_nodes, | ||
421 | NULL); | ||
416 | return GNUNET_YES; | 422 | return GNUNET_YES; |
417 | } | 423 | } |
418 | 424 | ||
@@ -629,9 +635,11 @@ void | |||
629 | GNUNET_TESTING_free_topology (struct GNUNET_TESTING_NetjailTopology *topology) | 635 | GNUNET_TESTING_free_topology (struct GNUNET_TESTING_NetjailTopology *topology) |
630 | { | 636 | { |
631 | GNUNET_CONTAINER_multishortmap_iterate (topology->map_namespaces, | 637 | GNUNET_CONTAINER_multishortmap_iterate (topology->map_namespaces, |
632 | free_namespaces_cb, NULL); | 638 | &free_namespaces_cb, |
639 | NULL); | ||
633 | GNUNET_CONTAINER_multishortmap_destroy (topology->map_namespaces); | 640 | GNUNET_CONTAINER_multishortmap_destroy (topology->map_namespaces); |
634 | GNUNET_CONTAINER_multishortmap_iterate (topology->map_globals, free_nodes_cb, | 641 | GNUNET_CONTAINER_multishortmap_iterate (topology->map_globals, |
642 | &free_nodes_cb, | ||
635 | NULL); | 643 | NULL); |
636 | GNUNET_CONTAINER_multishortmap_destroy (topology->map_globals); | 644 | GNUNET_CONTAINER_multishortmap_destroy (topology->map_globals); |
637 | GNUNET_free (topology->plugin); | 645 | GNUNET_free (topology->plugin); |