summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-07 00:00:38 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-07 00:00:38 +0200
commit8ad820fae4cf114fa9e12490eba19730c8a8a850 (patch)
tree688ca8a42a70dba6b52e933e3c21d87b237219a6 /src
parent6d7fd3328a2ffe42ef52f914d913f1ee4d290adc (diff)
fix crash
Diffstat (limited to 'src')
-rw-r--r--src/statistics/gnunet-statistics.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/statistics/gnunet-statistics.c b/src/statistics/gnunet-statistics.c
index e004a0f1c..ae99662c4 100644
--- a/src/statistics/gnunet-statistics.c
+++ b/src/statistics/gnunet-statistics.c
@@ -371,7 +371,6 @@ clean_node (void *cls)
if (num_nodes == num_nodes_ready_shutdown)
{
GNUNET_array_grow (nodes, num_nodes, 0);
- GNUNET_CONTAINER_multihashmap_destroy (values);
}
}
@@ -384,7 +383,10 @@ clean_node (void *cls)
static void
print_finish (void *cls)
{
- GNUNET_CONTAINER_multihashmap_iterate (values, printer, NULL);
+ GNUNET_CONTAINER_multihashmap_iterate (values,
+ &printer,
+ NULL);
+ GNUNET_CONTAINER_multihashmap_destroy (values);
GNUNET_SCHEDULER_shutdown ();
}
@@ -398,7 +400,8 @@ print_finish (void *cls)
* @param succes Whether statistics were obtained successfully.
*/
static void
-continuation_print (void *cls, int success)
+continuation_print (void *cls,
+ int success)
{
const unsigned index_node = *(unsigned *) cls;
@@ -406,7 +409,9 @@ continuation_print (void *cls, int success)
if (GNUNET_OK != success)
{
if (NULL == remote_host)
- fprintf (stderr, "%s", _ ("Failed to obtain statistics.\n"));
+ fprintf (stderr,
+ "%s",
+ _ ("Failed to obtain statistics.\n"));
else
fprintf (stderr,
_ ("Failed to obtain statistics from host `%s:%llu'\n"),
@@ -419,11 +424,13 @@ continuation_print (void *cls, int success)
GNUNET_SCHEDULER_cancel (nodes[index_node].shutdown_task);
nodes[index_node].shutdown_task = NULL;
}
- GNUNET_SCHEDULER_add_now (clean_node, &nodes[index_node].index_node);
+ GNUNET_SCHEDULER_add_now (&clean_node,
+ &nodes[index_node].index_node);
num_nodes_ready++;
if (num_nodes_ready == num_nodes)
{
- GNUNET_SCHEDULER_add_now (print_finish, NULL);
+ GNUNET_SCHEDULER_add_now (&print_finish,
+ NULL);
}
}