diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-09-27 19:14:01 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-09-27 19:14:01 +0000 |
commit | a6a4bf9797ecf078179a102f52d1e30a4987bf03 (patch) | |
tree | c73b72bbf6552b95fbc43a48d3e2296cf16ddb50 /src/fs | |
parent | 383eec1895fff4a83f26bb8244d86571dd5baef9 (diff) | |
download | gnunet-a6a4bf9797ecf078179a102f52d1e30a4987bf03.tar.gz gnunet-a6a4bf9797ecf078179a102f52d1e30a4987bf03.zip |
-converting more places to use STRINGS_relative_time_to_string
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/gnunet-service-fs_cp.c | 17 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs_pr.c | 18 |
2 files changed, 17 insertions, 18 deletions
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index 359ae9d19..4ff6432b0 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c | |||
@@ -557,8 +557,9 @@ ats_reserve_callback (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
557 | struct GSF_PeerTransmitHandle *pth; | 557 | struct GSF_PeerTransmitHandle *pth; |
558 | 558 | ||
559 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 559 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
560 | "Reserved %d bytes / need to wait %llu ms for reservation\n", | 560 | "Reserved %d bytes / need to wait %s for reservation\n", |
561 | (int) amount, (unsigned long long) res_delay.rel_value); | 561 | (int) amount, |
562 | GNUNET_STRINGS_relative_time_to_string (res_delay, GNUNET_YES)); | ||
562 | cp->rc = NULL; | 563 | cp->rc = NULL; |
563 | if (0 == amount) | 564 | if (0 == amount) |
564 | { | 565 | { |
@@ -704,8 +705,9 @@ GSF_handle_p2p_migration_stop_ (void *cls, | |||
704 | 1, GNUNET_NO); | 705 | 1, GNUNET_NO); |
705 | bt = GNUNET_TIME_relative_ntoh (msm->duration); | 706 | bt = GNUNET_TIME_relative_ntoh (msm->duration); |
706 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 707 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
707 | _("Migration of content to peer `%s' blocked for %llu ms\n"), | 708 | _("Migration of content to peer `%s' blocked for %s\n"), |
708 | GNUNET_i2s (other), (unsigned long long) bt.rel_value); | 709 | GNUNET_i2s (other), |
710 | GNUNET_STRINGS_relative_time_to_string (bt, GNUNET_YES)); | ||
709 | cp->ppd.migration_blocked_until = GNUNET_TIME_relative_to_absolute (bt); | 711 | cp->ppd.migration_blocked_until = GNUNET_TIME_relative_to_absolute (bt); |
710 | if (GNUNET_SCHEDULER_NO_TASK == cp->mig_revive_task) | 712 | if (GNUNET_SCHEDULER_NO_TASK == cp->mig_revive_task) |
711 | { | 713 | { |
@@ -1702,10 +1704,9 @@ GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp, | |||
1702 | if (cp->last_migration_block.abs_value > block_time.abs_value) | 1704 | if (cp->last_migration_block.abs_value > block_time.abs_value) |
1703 | { | 1705 | { |
1704 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1706 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1705 | "Migration already blocked for another %llu ms\n", | 1707 | "Migration already blocked for another %s\n", |
1706 | (unsigned long long) | 1708 | GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_remaining |
1707 | GNUNET_TIME_absolute_get_remaining | 1709 | (cp->last_migration_block), GNUNET_YES)); |
1708 | (cp->last_migration_block).rel_value); | ||
1709 | return; /* already blocked */ | 1710 | return; /* already blocked */ |
1710 | } | 1711 | } |
1711 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Asking to stop migration for %llu ms\n", | 1712 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Asking to stop migration for %llu ms\n", |
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c index 72babdb05..1df10abd2 100644 --- a/src/fs/gnunet-service-fs_pr.c +++ b/src/fs/gnunet-service-fs_pr.c | |||
@@ -931,8 +931,8 @@ put_migration_continuation (void *cls, int success, | |||
931 | if (min_expiration.abs_value > 0) | 931 | if (min_expiration.abs_value > 0) |
932 | { | 932 | { |
933 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 933 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
934 | "Asking to stop migration for %llu ms because datastore is full\n", | 934 | "Asking to stop migration for %s because datastore is full\n", |
935 | (unsigned long long) GNUNET_TIME_absolute_get_remaining (min_expiration).rel_value); | 935 | GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_remaining (min_expiration), GNUNET_YES)); |
936 | GSF_block_peer_migration_ (cp, min_expiration); | 936 | GSF_block_peer_migration_ (cp, min_expiration); |
937 | } | 937 | } |
938 | else | 938 | else |
@@ -945,8 +945,8 @@ put_migration_continuation (void *cls, int success, | |||
945 | ppd->migration_delay.rel_value); | 945 | ppd->migration_delay.rel_value); |
946 | ppd->migration_delay = GNUNET_TIME_relative_multiply (ppd->migration_delay, 2); | 946 | ppd->migration_delay = GNUNET_TIME_relative_multiply (ppd->migration_delay, 2); |
947 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 947 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
948 | "Replicated content already exists locally, asking to stop migration for %llu ms\n", | 948 | "Replicated content already exists locally, asking to stop migration for %s\n", |
949 | (unsigned long long) mig_pause.rel_value); | 949 | GNUNET_STRINGS_relative_time_to_string (mig_pause, GNUNET_YES)); |
950 | GSF_block_peer_migration_ (cp, GNUNET_TIME_relative_to_absolute (mig_pause)); | 950 | GSF_block_peer_migration_ (cp, GNUNET_TIME_relative_to_absolute (mig_pause)); |
951 | } | 951 | } |
952 | } | 952 | } |
@@ -1105,9 +1105,8 @@ warn_delay_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1105 | struct GSF_PendingRequest *pr = cls; | 1105 | struct GSF_PendingRequest *pr = cls; |
1106 | 1106 | ||
1107 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1107 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
1108 | _("Datastore lookup already took %llu ms!\n"), | 1108 | _("Datastore lookup already took %s!\n"), |
1109 | (unsigned long long) | 1109 | GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration (pr->qe_start), GNUNET_YES)); |
1110 | GNUNET_TIME_absolute_get_duration (pr->qe_start).rel_value); | ||
1111 | pr->warn_task = | 1110 | pr->warn_task = |
1112 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, &warn_delay_task, | 1111 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, &warn_delay_task, |
1113 | pr); | 1112 | pr); |
@@ -1126,9 +1125,8 @@ odc_warn_delay_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1126 | struct GSF_PendingRequest *pr = cls; | 1125 | struct GSF_PendingRequest *pr = cls; |
1127 | 1126 | ||
1128 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1127 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
1129 | _("On-demand lookup already took %llu ms!\n"), | 1128 | _("On-demand lookup already took %s!\n"), |
1130 | (unsigned long long) | 1129 | GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration (pr->qe_start), GNUNET_YES)); |
1131 | GNUNET_TIME_absolute_get_duration (pr->qe_start).rel_value); | ||
1132 | pr->warn_task = | 1130 | pr->warn_task = |
1133 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, | 1131 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, |
1134 | &odc_warn_delay_task, pr); | 1132 | &odc_warn_delay_task, pr); |