summaryrefslogtreecommitdiff
path: root/src/statistics/test_statistics_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-03-12 12:36:50 +0000
committerChristian Grothoff <christian@grothoff.org>2010-03-12 12:36:50 +0000
commit61cfd3340e67672f351ab92dab7da72dca058c79 (patch)
tree7144d056b877397aff501ec7f36e42f659350be8 /src/statistics/test_statistics_api.c
parent6324d68ac07d6cc498c934727ba5970909741c85 (diff)
downloadgnunet-61cfd3340e67672f351ab92dab7da72dca058c79.tar.gz
gnunet-61cfd3340e67672f351ab92dab7da72dca058c79.zip
enable stats get cancellation
Diffstat (limited to 'src/statistics/test_statistics_api.c')
-rw-r--r--src/statistics/test_statistics_api.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/statistics/test_statistics_api.c b/src/statistics/test_statistics_api.c
index 8a4a5e911..d7eb90b4d 100644
--- a/src/statistics/test_statistics_api.c
+++ b/src/statistics/test_statistics_api.c
@@ -83,8 +83,9 @@ static void
83next (void *cls, int success) 83next (void *cls, int success)
84{ 84{
85 GNUNET_assert (success == GNUNET_OK); 85 GNUNET_assert (success == GNUNET_OK);
86 GNUNET_STATISTICS_get (h, NULL, "test-2", 86 GNUNET_break (NULL !=
87 GNUNET_TIME_UNIT_SECONDS, &next_fin, &check_2, cls); 87 GNUNET_STATISTICS_get (h, NULL, "test-2",
88 GNUNET_TIME_UNIT_SECONDS, &next_fin, &check_2, cls));
88} 89}
89 90
90static void 91static void
@@ -100,8 +101,9 @@ run (void *cls,
100 GNUNET_STATISTICS_set (h, "test-2", 2, GNUNET_NO); 101 GNUNET_STATISTICS_set (h, "test-2", 2, GNUNET_NO);
101 GNUNET_STATISTICS_set (h, "test-3", 2, GNUNET_NO); 102 GNUNET_STATISTICS_set (h, "test-3", 2, GNUNET_NO);
102 GNUNET_STATISTICS_update (h, "test-3", 1, GNUNET_YES); 103 GNUNET_STATISTICS_update (h, "test-3", 1, GNUNET_YES);
103 GNUNET_STATISTICS_get (h, NULL, "test-1", 104 GNUNET_break (NULL !=
104 GNUNET_TIME_UNIT_SECONDS, &next, &check_1, cls); 105 GNUNET_STATISTICS_get (h, NULL, "test-1",
106 GNUNET_TIME_UNIT_SECONDS, &next, &check_1, cls));
105} 107}
106 108
107static void 109static void
@@ -112,8 +114,9 @@ run_more (void *cls,
112 const struct GNUNET_CONFIGURATION_Handle *cfg) 114 const struct GNUNET_CONFIGURATION_Handle *cfg)
113{ 115{
114 h = GNUNET_STATISTICS_create (sched, "test-statistics-api", cfg); 116 h = GNUNET_STATISTICS_create (sched, "test-statistics-api", cfg);
115 GNUNET_STATISTICS_get (h, NULL, "test-3", 117 GNUNET_break (NULL !=
116 GNUNET_TIME_UNIT_SECONDS, &next_fin, &check_3, cls); 118 GNUNET_STATISTICS_get (h, NULL, "test-3",
119 GNUNET_TIME_UNIT_SECONDS, &next_fin, &check_3, cls));
117} 120}
118 121
119static int 122static int