aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-09-27 19:14:01 +0000
committerChristian Grothoff <christian@grothoff.org>2012-09-27 19:14:01 +0000
commita6a4bf9797ecf078179a102f52d1e30a4987bf03 (patch)
treec73b72bbf6552b95fbc43a48d3e2296cf16ddb50 /src
parent383eec1895fff4a83f26bb8244d86571dd5baef9 (diff)
downloadgnunet-a6a4bf9797ecf078179a102f52d1e30a4987bf03.tar.gz
gnunet-a6a4bf9797ecf078179a102f52d1e30a4987bf03.zip
-converting more places to use STRINGS_relative_time_to_string
Diffstat (limited to 'src')
-rw-r--r--src/arm/arm_api.c4
-rw-r--r--src/arm/gnunet-service-arm.c4
-rw-r--r--src/core/gnunet-service-core_kx.c4
-rw-r--r--src/fs/gnunet-service-fs_cp.c17
-rw-r--r--src/fs/gnunet-service-fs_pr.c18
-rw-r--r--src/transport/gnunet-transport.c9
6 files changed, 28 insertions, 28 deletions
diff --git a/src/arm/arm_api.c b/src/arm/arm_api.c
index 7c18c617e..328ef3f0b 100644
--- a/src/arm/arm_api.c
+++ b/src/arm/arm_api.c
@@ -533,7 +533,7 @@ GNUNET_ARM_start_service (struct GNUNET_ARM_Handle *h,
533 533
534 LOG (GNUNET_ERROR_TYPE_DEBUG, 534 LOG (GNUNET_ERROR_TYPE_DEBUG,
535 "Asked to start service `%s' within %s\n", service_name, 535 "Asked to start service `%s' within %s\n", service_name,
536 GNUNET_STRINGS_relative_time_to_string (timeout)); 536 GNUNET_STRINGS_relative_time_to_string (timeout, GNUNET_NO));
537 if (0 == strcasecmp ("arm", service_name)) 537 if (0 == strcasecmp ("arm", service_name))
538 { 538 {
539 slen = strlen ("arm") + 1; 539 slen = strlen ("arm") + 1;
@@ -607,7 +607,7 @@ GNUNET_ARM_stop_service (struct GNUNET_ARM_Handle *h,
607 LOG (GNUNET_ERROR_TYPE_DEBUG, 607 LOG (GNUNET_ERROR_TYPE_DEBUG,
608 "Stopping service `%s' within %s\n", 608 "Stopping service `%s' within %s\n",
609 service_name, 609 service_name,
610 GNUNET_STRINGS_relative_time_to_string (timeout)); 610 GNUNET_STRINGS_relative_time_to_string (timeout, GNUNET_NO));
611 if (h->client == NULL) 611 if (h->client == NULL)
612 { 612 {
613 client = GNUNET_CLIENT_connect ("arm", h->cfg); 613 client = GNUNET_CLIENT_connect ("arm", h->cfg);
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c
index dab38eaf3..21e86c770 100644
--- a/src/arm/gnunet-service-arm.c
+++ b/src/arm/gnunet-service-arm.c
@@ -983,9 +983,9 @@ maint_child_death (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
983 if (0 != pos->killed_at.abs_value) 983 if (0 != pos->killed_at.abs_value)
984 { 984 {
985 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 985 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
986 _("Service `%s' took %llu ms to terminate\n"), 986 _("Service `%s' took %s to terminate\n"),
987 pos->name, 987 pos->name,
988 GNUNET_TIME_absolute_get_duration (pos->killed_at).rel_value); 988 GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration (pos->killed_at), GNUNET_YES));
989 } 989 }
990 GNUNET_OS_process_destroy (pos->proc); 990 GNUNET_OS_process_destroy (pos->proc);
991 pos->proc = NULL; 991 pos->proc = NULL;
diff --git a/src/core/gnunet-service-core_kx.c b/src/core/gnunet-service-core_kx.c
index 755d0c34c..39f58c594 100644
--- a/src/core/gnunet-service-core_kx.c
+++ b/src/core/gnunet-service-core_kx.c
@@ -1625,8 +1625,8 @@ GSC_KX_handle_encrypted_message (struct GSC_KeyExchangeInfo *kx,
1625 MAX_MESSAGE_AGE.rel_value) 1625 MAX_MESSAGE_AGE.rel_value)
1626 { 1626 {
1627 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1627 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
1628 _("Message received far too old (%llu ms). Content ignored.\n"), 1628 _("Message received far too old (%s). Content ignored.\n"),
1629 GNUNET_TIME_absolute_get_duration (t).rel_value); 1629 GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration (t), GNUNET_YES));
1630 GNUNET_STATISTICS_update (GSC_stats, 1630 GNUNET_STATISTICS_update (GSC_stats,
1631 gettext_noop 1631 gettext_noop
1632 ("# bytes dropped (ancient message)"), size, 1632 ("# bytes dropped (ancient message)"), size,
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);
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c
index 1c865ad94..217fbf51f 100644
--- a/src/transport/gnunet-transport.c
+++ b/src/transport/gnunet-transport.c
@@ -325,16 +325,17 @@ do_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
325 if (benchmark_receive) 325 if (benchmark_receive)
326 { 326 {
327 duration = GNUNET_TIME_absolute_get_duration (start_time); 327 duration = GNUNET_TIME_absolute_get_duration (start_time);
328 FPRINTF (stdout, _("Received %llu bytes/s (%llu bytes in %llu ms)\n"), 328 FPRINTF (stdout, _("Received %llu bytes/s (%llu bytes in %s)\n"),
329 1000 * traffic_received / (1 + duration.rel_value), 329 1000 * traffic_received / (1 + duration.rel_value),
330 traffic_received, (unsigned long long) duration.rel_value); 330 traffic_received,
331 GNUNET_STRINGS_relative_time_to_string (duration, GNUNET_YES));
331 } 332 }
332 if (benchmark_send) 333 if (benchmark_send)
333 { 334 {
334 duration = GNUNET_TIME_absolute_get_duration (start_time); 335 duration = GNUNET_TIME_absolute_get_duration (start_time);
335 FPRINTF (stdout, _("Transmitted %llu bytes/s (%llu bytes in %llu ms)\n"), 336 FPRINTF (stdout, _("Transmitted %llu bytes/s (%llu bytes in %s)\n"),
336 1000 * traffic_sent / (1 + duration.rel_value), traffic_sent, 337 1000 * traffic_sent / (1 + duration.rel_value), traffic_sent,
337 (unsigned long long) duration.rel_value); 338 GNUNET_STRINGS_relative_time_to_string (duration, GNUNET_YES));
338 } 339 }
339} 340}
340 341