- GNUNET_FS_TEST_daemons_stop (sched,
- NUM_DAEMONS,
- daemons);
- if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE))
- {
- del = GNUNET_TIME_absolute_get_duration (start_time);
- if (del.value == 0)
- del.value = 1;
- fancy = GNUNET_STRINGS_byte_size_fancy (((unsigned long long)FILESIZE) * 1000LL / del.value);
- fprintf (stdout,
- "Download speed was %s/s\n",
- fancy);
- GNUNET_free (fancy);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Finished download, shutting down\n",
- (unsigned long long) FILESIZE);
- }
+ if (NULL != cc)
+ {
+ GNUNET_FS_TEST_daemons_connect_cancel (cc);
+ cc = NULL;
+ }
+ GNUNET_FS_TEST_daemons_stop (NUM_DAEMONS, daemons);
+ if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT))
+ {
+ del = GNUNET_TIME_absolute_get_duration (start_time);
+ if (del.rel_value == 0)
+ del.rel_value = 1;
+ fancy =
+ GNUNET_STRINGS_byte_size_fancy (((unsigned long long) FILESIZE) *
+ 1000LL / del.rel_value);
+ FPRINTF (stdout, "Download speed was %s/s\n", fancy);
+ GNUNET_free (fancy);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished download, shutting down\n",
+ (unsigned long long) FILESIZE);
+ }