From 81dfe20c8ee82d202244766f2914683a63d078ca Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 20 Jan 2011 11:45:01 +0000 Subject: abs_value --- src/fs/test_fs_download.c | 20 +++++++++++--------- src/fs/test_fs_download_indexed.c | 16 ++++++++-------- src/fs/test_fs_download_persistence.c | 16 ++++++++-------- src/fs/test_fs_list_indexed.c | 8 ++++---- src/fs/test_fs_publish.c | 8 ++++---- src/fs/test_fs_publish_persistence.c | 8 ++++---- src/fs/test_fs_search.c | 8 ++++---- src/fs/test_fs_search_persistence.c | 8 ++++---- src/fs/test_fs_unindex.c | 16 ++++++++-------- src/fs/test_fs_unindex_persistence.c | 16 ++++++++-------- 10 files changed, 63 insertions(+), 61 deletions(-) diff --git a/src/fs/test_fs_download.c b/src/fs/test_fs_download.c index a06054f6d..0d13b3639 100644 --- a/src/fs/test_fs_download.c +++ b/src/fs/test_fs_download.c @@ -29,7 +29,7 @@ #include "gnunet_arm_service.h" #include "gnunet_fs_service.h" -#define VERBOSE GNUNET_NO +#define VERBOSE GNUNET_YES #define START_ARM GNUNET_YES @@ -86,6 +86,8 @@ timeout_kill_task (void *cls, GNUNET_FS_publish_stop (publish); publish = NULL; } + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Timeout downloading file\n"); timeout_kill = GNUNET_SCHEDULER_NO_TASK; err = 1; } @@ -140,10 +142,10 @@ progress_cb (void *cls, case GNUNET_FS_STATUS_PUBLISH_PROGRESS: #if VERBOSE printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n", - (unsigned long long) event->abs_value.publish.completed, - (unsigned long long) event->abs_value.publish.size, - event->abs_value.publish.specifics.progress.depth, - (unsigned long long) event->abs_value.publish.specifics.progress.offset); + (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); #endif break; case GNUNET_FS_STATUS_PUBLISH_COMPLETED: @@ -173,10 +175,10 @@ progress_cb (void *cls, GNUNET_assert (download == event->value.download.dc); #if VERBOSE printf ("Download is progressing (%llu/%llu at level %u off %llu)...\n", - (unsigned long long) event->abs_value.download.completed, - (unsigned long long) event->abs_value.download.size, - event->abs_value.download.specifics.progress.depth, - (unsigned long long) event->abs_value.download.specifics.progress.offset); + (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); #endif break; case GNUNET_FS_STATUS_PUBLISH_ERROR: diff --git a/src/fs/test_fs_download_indexed.c b/src/fs/test_fs_download_indexed.c index 6d1465cd1..1a88ad80e 100644 --- a/src/fs/test_fs_download_indexed.c +++ b/src/fs/test_fs_download_indexed.c @@ -142,10 +142,10 @@ progress_cb (void *cls, case GNUNET_FS_STATUS_PUBLISH_PROGRESS: #if VERBOSE printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n", - (unsigned long long) event->abs_value.publish.completed, - (unsigned long long) event->abs_value.publish.size, - event->abs_value.publish.specifics.progress.depth, - (unsigned long long) event->abs_value.publish.specifics.progress.offset); + (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); #endif break; case GNUNET_FS_STATUS_PUBLISH_COMPLETED: @@ -175,10 +175,10 @@ progress_cb (void *cls, GNUNET_assert (download == event->value.download.dc); #if VERBOSE printf ("Download is progressing (%llu/%llu at level %u off %llu)...\n", - (unsigned long long) event->abs_value.download.completed, - (unsigned long long) event->abs_value.download.size, - event->abs_value.download.specifics.progress.depth, - (unsigned long long) event->abs_value.download.specifics.progress.offset); + (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); #endif break; case GNUNET_FS_STATUS_PUBLISH_ERROR: diff --git a/src/fs/test_fs_download_persistence.c b/src/fs/test_fs_download_persistence.c index 66d1199ca..e00d5255d 100644 --- a/src/fs/test_fs_download_persistence.c +++ b/src/fs/test_fs_download_persistence.c @@ -176,10 +176,10 @@ progress_cb (void *cls, case GNUNET_FS_STATUS_PUBLISH_PROGRESS: #if VERBOSE printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n", - (unsigned long long) event->abs_value.publish.completed, - (unsigned long long) event->abs_value.publish.size, - event->abs_value.publish.specifics.progress.depth, - (unsigned long long) event->abs_value.publish.specifics.progress.offset); + (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); #endif break; case GNUNET_FS_STATUS_PUBLISH_COMPLETED: @@ -211,10 +211,10 @@ progress_cb (void *cls, GNUNET_assert (download == event->value.download.dc); #if VERBOSE printf ("Download is progressing (%llu/%llu at level %u off %llu)...\n", - (unsigned long long) event->abs_value.download.completed, - (unsigned long long) event->abs_value.download.size, - event->abs_value.download.specifics.progress.depth, - (unsigned long long) event->abs_value.download.specifics.progress.offset); + (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); #endif break; case GNUNET_FS_STATUS_PUBLISH_ERROR: diff --git a/src/fs/test_fs_list_indexed.c b/src/fs/test_fs_list_indexed.c index 206e58baf..ec3d6fecd 100644 --- a/src/fs/test_fs_list_indexed.c +++ b/src/fs/test_fs_list_indexed.c @@ -125,10 +125,10 @@ progress_cb (void *cls, GNUNET_assert (publish == event->value.publish.pc); #if VERBOSE printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n", - (unsigned long long) event->abs_value.publish.completed, - (unsigned long long) event->abs_value.publish.size, - event->abs_value.publish.specifics.progress.depth, - (unsigned long long) event->abs_value.publish.specifics.progress.offset); + (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); #endif break; case GNUNET_FS_STATUS_PUBLISH_ERROR: diff --git a/src/fs/test_fs_publish.c b/src/fs/test_fs_publish.c index 327fa5a69..99d4b6710 100644 --- a/src/fs/test_fs_publish.c +++ b/src/fs/test_fs_publish.c @@ -110,10 +110,10 @@ progress_cb (void *cls, GNUNET_assert (publish == event->value.publish.pc); #if VERBOSE printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n", - (unsigned long long) event->abs_value.publish.completed, - (unsigned long long) event->abs_value.publish.size, - event->abs_value.publish.specifics.progress.depth, - (unsigned long long) event->abs_value.publish.specifics.progress.offset); + (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); #endif break; case GNUNET_FS_STATUS_PUBLISH_ERROR: diff --git a/src/fs/test_fs_publish_persistence.c b/src/fs/test_fs_publish_persistence.c index 52b2b270e..4a84bf9dc 100644 --- a/src/fs/test_fs_publish_persistence.c +++ b/src/fs/test_fs_publish_persistence.c @@ -157,10 +157,10 @@ progress_cb (void *cls, GNUNET_assert (publish == event->value.publish.pc); #if VERBOSE printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n", - (unsigned long long) event->abs_value.publish.completed, - (unsigned long long) event->abs_value.publish.size, - event->abs_value.publish.specifics.progress.depth, - (unsigned long long) event->abs_value.publish.specifics.progress.offset); + (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); #endif break; case GNUNET_FS_STATUS_PUBLISH_SUSPEND: diff --git a/src/fs/test_fs_search.c b/src/fs/test_fs_search.c index b003b75e1..2544b8a6e 100644 --- a/src/fs/test_fs_search.c +++ b/src/fs/test_fs_search.c @@ -101,10 +101,10 @@ progress_cb (void *cls, case GNUNET_FS_STATUS_PUBLISH_PROGRESS: #if VERBOSE printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n", - (unsigned long long) event->abs_value.publish.completed, - (unsigned long long) event->abs_value.publish.size, - event->abs_value.publish.specifics.progress.depth, - (unsigned long long) event->abs_value.publish.specifics.progress.offset); + (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); #endif break; case GNUNET_FS_STATUS_PUBLISH_COMPLETED: diff --git a/src/fs/test_fs_search_persistence.c b/src/fs/test_fs_search_persistence.c index 4def3fe6a..e2a213cd8 100644 --- a/src/fs/test_fs_search_persistence.c +++ b/src/fs/test_fs_search_persistence.c @@ -146,10 +146,10 @@ progress_cb (void *cls, case GNUNET_FS_STATUS_PUBLISH_PROGRESS: #if VERBOSE printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n", - (unsigned long long) event->abs_value.publish.completed, - (unsigned long long) event->abs_value.publish.size, - event->abs_value.publish.specifics.progress.depth, - (unsigned long long) event->abs_value.publish.specifics.progress.offset); + (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); #endif break; case GNUNET_FS_STATUS_PUBLISH_COMPLETED: diff --git a/src/fs/test_fs_unindex.c b/src/fs/test_fs_unindex.c index e2c0e86ee..82d4cdcf7 100644 --- a/src/fs/test_fs_unindex.c +++ b/src/fs/test_fs_unindex.c @@ -100,10 +100,10 @@ progress_cb (void *cls, case GNUNET_FS_STATUS_PUBLISH_PROGRESS: #if VERBOSE printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n", - (unsigned long long) event->abs_value.publish.completed, - (unsigned long long) event->abs_value.publish.size, - event->abs_value.publish.specifics.progress.depth, - (unsigned long long) event->abs_value.publish.specifics.progress.offset); + (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); #endif break; case GNUNET_FS_STATUS_PUBLISH_COMPLETED: @@ -126,10 +126,10 @@ progress_cb (void *cls, GNUNET_assert (unindex == event->value.unindex.uc); #if VERBOSE printf ("Unindex is progressing (%llu/%llu at level %u off %llu)...\n", - (unsigned long long) event->abs_value.unindex.completed, - (unsigned long long) event->abs_value.unindex.size, - event->abs_value.unindex.specifics.progress.depth, - (unsigned long long) event->abs_value.unindex.specifics.progress.offset); + (unsigned long long) event->value.unindex.completed, + (unsigned long long) event->value.unindex.size, + event->value.unindex.specifics.progress.depth, + (unsigned long long) event->value.unindex.specifics.progress.offset); #endif break; case GNUNET_FS_STATUS_PUBLISH_ERROR: diff --git a/src/fs/test_fs_unindex_persistence.c b/src/fs/test_fs_unindex_persistence.c index eec181544..162dd59af 100644 --- a/src/fs/test_fs_unindex_persistence.c +++ b/src/fs/test_fs_unindex_persistence.c @@ -147,10 +147,10 @@ progress_cb (void *cls, case GNUNET_FS_STATUS_PUBLISH_PROGRESS: #if VERBOSE printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n", - (unsigned long long) event->abs_value.publish.completed, - (unsigned long long) event->abs_value.publish.size, - event->abs_value.publish.specifics.progress.depth, - (unsigned long long) event->abs_value.publish.specifics.progress.offset); + (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); #endif break; case GNUNET_FS_STATUS_PUBLISH_COMPLETED: @@ -174,10 +174,10 @@ progress_cb (void *cls, GNUNET_assert (unindex == event->value.unindex.uc); #if VERBOSE printf ("Unindex is progressing (%llu/%llu at level %u off %llu)...\n", - (unsigned long long) event->abs_value.unindex.completed, - (unsigned long long) event->abs_value.unindex.size, - event->abs_value.unindex.specifics.progress.depth, - (unsigned long long) event->abs_value.unindex.specifics.progress.offset); + (unsigned long long) event->value.unindex.completed, + (unsigned long long) event->value.unindex.size, + event->value.unindex.specifics.progress.depth, + (unsigned long long) event->value.unindex.specifics.progress.offset); #endif break; case GNUNET_FS_STATUS_PUBLISH_SUSPEND: -- cgit v1.2.3