diff options
Diffstat (limited to 'src/testbed/gnunet-service-test-barriers.c')
-rw-r--r-- | src/testbed/gnunet-service-test-barriers.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/testbed/gnunet-service-test-barriers.c b/src/testbed/gnunet-service-test-barriers.c index ce5249696..874c7a363 100644 --- a/src/testbed/gnunet-service-test-barriers.c +++ b/src/testbed/gnunet-service-test-barriers.c | |||
@@ -76,7 +76,9 @@ do_shutdown (void *cls) | |||
76 | * #GNUNET_OK if the barrier is crossed | 76 | * #GNUNET_OK if the barrier is crossed |
77 | */ | 77 | */ |
78 | static void | 78 | static void |
79 | barrier_wait_cb (void *cls, const char *name, int status) | 79 | barrier_wait_cb (void *cls, |
80 | const char *name, | ||
81 | int status) | ||
80 | { | 82 | { |
81 | GNUNET_break (NULL == cls); | 83 | GNUNET_break (NULL == cls); |
82 | wh = NULL; | 84 | wh = NULL; |
@@ -117,10 +119,12 @@ run (void *cls, | |||
117 | { | 119 | { |
118 | unsigned int rsec; | 120 | unsigned int rsec; |
119 | 121 | ||
120 | rsec = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE, 10); | 122 | rsec = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE, |
121 | tt = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 123 | 10); |
122 | (GNUNET_TIME_UNIT_SECONDS, rsec), | 124 | tt = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, |
123 | &do_wait, NULL); | 125 | rsec), |
126 | &do_wait, | ||
127 | NULL); | ||
124 | GNUNET_SCHEDULER_add_shutdown (&do_shutdown, NULL); | 128 | GNUNET_SCHEDULER_add_shutdown (&do_shutdown, NULL); |
125 | } | 129 | } |
126 | 130 | ||
@@ -139,6 +143,10 @@ main (int argc, char **argv) | |||
139 | 143 | ||
140 | ret = | 144 | ret = |
141 | GNUNET_PROGRAM_run (argc, argv, | 145 | GNUNET_PROGRAM_run (argc, argv, |
142 | "test-barriers", "nohelp", options, &run, NULL); | 146 | "test-barriers", |
147 | "nohelp", | ||
148 | options, | ||
149 | &run, | ||
150 | NULL); | ||
143 | return ret; | 151 | return ret; |
144 | } | 152 | } |