fix rps profiler: mark statistics get done in right place
authorJulius Bünger <buenger@mytum.de>
Tue, 10 Jul 2018 10:37:57 +0000 (12:37 +0200)
committerJulius Bünger <buenger@mytum.de>
Tue, 10 Jul 2018 10:37:57 +0000 (12:37 +0200)
src/rps/gnunet-rps-profiler.c

index cab7f6dc45df8e5c13c36ae6a50f7f46b03eb46c..4ebd745e88852e19ec5e022a56673b53743df59b 100644 (file)
@@ -2372,6 +2372,8 @@ post_test_shutdown_ready_cb (void *cls,
 {
   struct STATcls *stat_cls = (struct STATcls *) cls;
   struct RPSPeer *rps_peer = stat_cls->rps_peer;
+
+  rps_peer->h_stat_get[stat_cls->stat_type] = NULL;
   if (GNUNET_OK == success)
   {
     /* set flag that we we got the value */
@@ -2428,7 +2430,6 @@ stat_iterator (void *cls,
       //stat_type_2_str (stat_cls->stat_type),
       name,
       value);
-  rps_peer->h_stat_get[stat_str_2_type (name)] = NULL;
   to_file (rps_peer->file_name_stats,
           "%s: %" PRIu64 "\n",
           name,