diff options
Diffstat (limited to 'src/ats-tests/gnunet-ats-sim.c')
-rw-r--r-- | src/ats-tests/gnunet-ats-sim.c | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/src/ats-tests/gnunet-ats-sim.c b/src/ats-tests/gnunet-ats-sim.c index f624c2b21..56f8f2223 100644 --- a/src/ats-tests/gnunet-ats-sim.c +++ b/src/ats-tests/gnunet-ats-sim.c | |||
@@ -168,32 +168,25 @@ do_timeout (void *cls) | |||
168 | 168 | ||
169 | 169 | ||
170 | static void | 170 | static void |
171 | transport_recv_cb (void *cls, | 171 | log_request__cb (void *cls, |
172 | const struct GNUNET_PeerIdentity *peer, | 172 | const struct GNUNET_HELLO_Address *address, |
173 | const struct GNUNET_MessageHeader *message) | 173 | int address_active, |
174 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, | ||
175 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, | ||
176 | const struct GNUNET_ATS_Properties *ats) | ||
174 | { | 177 | { |
175 | |||
176 | } | ||
177 | |||
178 | static void | ||
179 | log_request__cb (void *cls, const struct GNUNET_HELLO_Address *address, | ||
180 | int address_active, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, | ||
181 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, | ||
182 | const struct GNUNET_ATS_Properties *ats) | ||
183 | { | ||
184 | |||
185 | if (NULL != l) | 178 | if (NULL != l) |
186 | { | 179 | { |
187 | //GNUNET_break (0); | 180 | //GNUNET_break (0); |
188 | //GNUNET_ATS_TEST_logging_now (l); | 181 | //GNUNET_ATS_TEST_logging_now (l); |
189 | } | 182 | } |
190 | |||
191 | } | 183 | } |
192 | 184 | ||
193 | 185 | ||
194 | static void | 186 | static void |
195 | experiment_done_cb (struct Experiment *e, | 187 | experiment_done_cb (struct Experiment *e, |
196 | struct GNUNET_TIME_Relative duration,int success) | 188 | struct GNUNET_TIME_Relative duration, |
189 | int success) | ||
197 | { | 190 | { |
198 | if (GNUNET_OK == success) | 191 | if (GNUNET_OK == success) |
199 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 192 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
@@ -222,15 +215,19 @@ experiment_done_cb (struct Experiment *e, | |||
222 | static void | 215 | static void |
223 | episode_done_cb (struct Episode *ep) | 216 | episode_done_cb (struct Episode *ep) |
224 | { | 217 | { |
225 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Episode %u done\n", ep->id); | 218 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
219 | "Episode %u done\n", | ||
220 | ep->id); | ||
226 | } | 221 | } |
227 | 222 | ||
228 | 223 | ||
229 | static void topology_setup_done (void *cls, | 224 | static void |
230 | struct BenchmarkPeer *masters, | 225 | topology_setup_done (void *cls, |
231 | struct BenchmarkPeer *slaves) | 226 | struct BenchmarkPeer *masters, |
227 | struct BenchmarkPeer *slaves) | ||
232 | { | 228 | { |
233 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Topology setup complete!\n"); | 229 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
230 | "Topology setup complete!\n"); | ||
234 | 231 | ||
235 | masters_p = masters; | 232 | masters_p = masters; |
236 | slaves_p = slaves; | 233 | slaves_p = slaves; |
@@ -240,7 +237,9 @@ static void topology_setup_done (void *cls, | |||
240 | masters_p, | 237 | masters_p, |
241 | e->num_masters, e->num_slaves, | 238 | e->num_masters, e->num_slaves, |
242 | opt_verbose); | 239 | opt_verbose); |
243 | GNUNET_ATS_TEST_experimentation_run (e, &episode_done_cb, &experiment_done_cb); | 240 | GNUNET_ATS_TEST_experimentation_run (e, |
241 | &episode_done_cb, | ||
242 | &experiment_done_cb); | ||
244 | /* | 243 | /* |
245 | GNUNET_ATS_TEST_generate_preferences_start(&masters[0],&masters[0].partners[0], | 244 | GNUNET_ATS_TEST_generate_preferences_start(&masters[0],&masters[0].partners[0], |
246 | GNUNET_ATS_TEST_TG_CONSTANT, 1, 1, GNUNET_TIME_UNIT_SECONDS, | 245 | GNUNET_ATS_TEST_TG_CONSTANT, 1, 1, GNUNET_TIME_UNIT_SECONDS, |
@@ -385,7 +384,6 @@ main (int argc, char *argv[]) | |||
385 | GNUNET_NO, | 384 | GNUNET_NO, |
386 | &topology_setup_done, | 385 | &topology_setup_done, |
387 | NULL, | 386 | NULL, |
388 | &transport_recv_cb, | ||
389 | &log_request__cb); | 387 | &log_request__cb); |
390 | GNUNET_free (opt_exp_file); | 388 | GNUNET_free (opt_exp_file); |
391 | return 0; | 389 | return 0; |