diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-09-16 11:27:08 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-09-16 11:27:08 +0000 |
commit | f736b24935d66733e9a53798fbc87dbc8aff9fca (patch) | |
tree | b7f865216ca4b40a4a6e4535dfa6677700a27efc /src/fs/gnunet-download.c | |
parent | c5784d2c94adcf1fe80e88c9ab1c152ce2fcbe95 (diff) | |
download | gnunet-f736b24935d66733e9a53798fbc87dbc8aff9fca.tar.gz gnunet-f736b24935d66733e9a53798fbc87dbc8aff9fca.zip |
-fixing #2546
Diffstat (limited to 'src/fs/gnunet-download.c')
-rw-r--r-- | src/fs/gnunet-download.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c index 2293cedd7..093dd7bdc 100644 --- a/src/fs/gnunet-download.c +++ b/src/fs/gnunet-download.c | |||
@@ -127,7 +127,7 @@ static void * | |||
127 | progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | 127 | progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) |
128 | { | 128 | { |
129 | char *s; | 129 | char *s; |
130 | char *s2; | 130 | const char *s2; |
131 | char *t; | 131 | char *t; |
132 | 132 | ||
133 | switch (info->status) | 133 | switch (info->status) |
@@ -140,13 +140,15 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
140 | case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS: | 140 | case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS: |
141 | if (verbose) | 141 | if (verbose) |
142 | { | 142 | { |
143 | s = GNUNET_STRINGS_relative_time_to_string (info->value.download.eta); | 143 | s = GNUNET_strdup (GNUNET_STRINGS_relative_time_to_string (info->value.download.eta, |
144 | GNUNET_YES)); | ||
144 | if (info->value.download.specifics.progress.block_download_duration.rel_value | 145 | if (info->value.download.specifics.progress.block_download_duration.rel_value |
145 | == GNUNET_TIME_UNIT_FOREVER_REL.rel_value) | 146 | == GNUNET_TIME_UNIT_FOREVER_REL.rel_value) |
146 | s2 = GNUNET_strdup (_("<unknown time>")); | 147 | s2 = _("<unknown time>"); |
147 | else | 148 | else |
148 | s2 = GNUNET_STRINGS_relative_time_to_string ( | 149 | s2 = GNUNET_STRINGS_relative_time_to_string ( |
149 | info->value.download.specifics.progress.block_download_duration); | 150 | info->value.download.specifics.progress.block_download_duration, |
151 | GNUNET_YES); | ||
150 | t = GNUNET_STRINGS_byte_size_fancy (info->value.download.completed * | 152 | t = GNUNET_STRINGS_byte_size_fancy (info->value.download.completed * |
151 | 1000LL / | 153 | 1000LL / |
152 | (info->value.download. | 154 | (info->value.download. |
@@ -157,7 +159,6 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
157 | (unsigned long long) info->value.download.completed, | 159 | (unsigned long long) info->value.download.completed, |
158 | (unsigned long long) info->value.download.size, s, t, s2); | 160 | (unsigned long long) info->value.download.size, s, t, s2); |
159 | GNUNET_free (s); | 161 | GNUNET_free (s); |
160 | GNUNET_free (s2); | ||
161 | GNUNET_free (t); | 162 | GNUNET_free (t); |
162 | } | 163 | } |
163 | else | 164 | else |