/**
* How long until we give up on transmitting the message?
*/
-#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
+#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 120)
/**
* How long should our test-content live?
GNUNET_FS_download_stop (download, GNUNET_YES);
download = NULL;
}
- GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_size (fn, &size, GNUNET_YES));
+ GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_size (fn, &size, GNUNET_YES, GNUNET_NO));
GNUNET_assert (size == FILESIZE);
GNUNET_DISK_directory_remove (fn);
GNUNET_free (fn);
(unsigned long long) event->value.publish.completed,
(unsigned long long) event->value.publish.size,
event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.
- offset);
+ (unsigned long long) event->value.publish.specifics.
+ progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
printf ("Publishing complete, %llu kb/s.\n",
(unsigned long long) (FILESIZE * 1000LL /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024LL));
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024LL));
GAUGER ("FS", "Publishing speed (insertion)",
(unsigned long long) (FILESIZE * 1000LL /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024LL), "kb/s");
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024LL), "kb/s");
fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst");
start = GNUNET_TIME_absolute_get ();
download =
GNUNET_FS_download_start (fs,
- event->value.publish.specifics.completed.
- chk_uri, NULL, fn, NULL, 0, FILESIZE, 1,
- GNUNET_FS_DOWNLOAD_OPTION_NONE, "download",
- NULL);
+ event->value.publish.specifics.
+ completed.chk_uri, NULL, fn, NULL, 0,
+ FILESIZE, 1, GNUNET_FS_DOWNLOAD_OPTION_NONE,
+ "download", NULL);
GNUNET_assert (download != NULL);
break;
case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
printf ("Download complete, %llu kb/s.\n",
(unsigned long long) (FILESIZE * 1000LL /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024LL));
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024LL));
GAUGER ("FS", "Local download speed (inserted)",
(unsigned long long) (FILESIZE * 1000LL /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024LL), "kb/s");
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024LL), "kb/s");
GNUNET_SCHEDULER_add_now (&abort_download_task, NULL);
break;
case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS:
(unsigned long long) event->value.download.completed,
(unsigned long long) event->value.download.size,
event->value.download.specifics.progress.depth,
- (unsigned long long) event->value.download.specifics.progress.
- offset);
+ (unsigned long long) event->value.download.specifics.
+ progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_ERROR:
- fprintf (stderr, "Error publishing file: %s\n",
+ FPRINTF (stderr, "Error publishing file: %s\n",
event->value.publish.specifics.error.message);
GNUNET_break (0);
GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
break;
case GNUNET_FS_STATUS_DOWNLOAD_ERROR:
- fprintf (stderr, "Error downloading file: %s\n",
+ FPRINTF (stderr, "Error downloading file: %s\n",
event->value.download.specifics.error.message);
GNUNET_SCHEDULER_add_now (&abort_download_task, NULL);
break;
p->cfg = GNUNET_CONFIGURATION_create ();
#if START_ARM
p->arm_proc =
- GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm",
+ GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-service-arm",
"gnunet-service-arm",
#if VERBOSE
"-L", "DEBUG",