aboutsummaryrefslogtreecommitdiff
path: root/src/fs/fs_download.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-06 20:55:28 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-06 20:55:28 +0000
commit61c39c60565b386e0e12ea669556b030e8cd7180 (patch)
tree59109aeab8297bdc996faca8c4e38ec7426c36cf /src/fs/fs_download.c
parent780eb09dd8040ecf8649d40ddf8314464e0fc48e (diff)
downloadgnunet-61c39c60565b386e0e12ea669556b030e8cd7180.tar.gz
gnunet-61c39c60565b386e0e12ea669556b030e8cd7180.zip
-remove trailing whitespace
Diffstat (limited to 'src/fs/fs_download.c')
-rw-r--r--src/fs/fs_download.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c
index 49c83bdc6..070be0106 100644
--- a/src/fs/fs_download.c
+++ b/src/fs/fs_download.c
@@ -690,7 +690,7 @@ try_top_down_reconstruction (struct GNUNET_FS_DownloadContext *dc,
690 drc = dr->children[i]; 690 drc = dr->children[i];
691 GNUNET_assert (drc->offset >= dr->offset); 691 GNUNET_assert (drc->offset >= dr->offset);
692 child_block_size = GNUNET_FS_tree_compute_tree_size (drc->depth); 692 child_block_size = GNUNET_FS_tree_compute_tree_size (drc->depth);
693 GNUNET_assert (0 == (drc->offset - dr->offset) % child_block_size); 693 GNUNET_assert (0 == (drc->offset - dr->offset) % child_block_size);
694 if (BRS_INIT == drc->state) 694 if (BRS_INIT == drc->state)
695 { 695 {
696 drc->state = BRS_CHK_SET; 696 drc->state = BRS_CHK_SET;
@@ -1083,7 +1083,7 @@ process_result_with_request (void *cls, const struct GNUNET_HashCode * key,
1083 pi.value.download.specifics.progress.respect_offered = prc->respect_offered; 1083 pi.value.download.specifics.progress.respect_offered = prc->respect_offered;
1084 pi.value.download.specifics.progress.num_transmissions = prc->num_transmissions; 1084 pi.value.download.specifics.progress.num_transmissions = prc->num_transmissions;
1085 if (prc->last_transmission.abs_value_us != GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us) 1085 if (prc->last_transmission.abs_value_us != GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us)
1086 pi.value.download.specifics.progress.block_download_duration 1086 pi.value.download.specifics.progress.block_download_duration
1087 = GNUNET_TIME_absolute_get_duration (prc->last_transmission); 1087 = GNUNET_TIME_absolute_get_duration (prc->last_transmission);
1088 else 1088 else
1089 pi.value.download.specifics.progress.block_download_duration 1089 pi.value.download.specifics.progress.block_download_duration
@@ -1445,7 +1445,7 @@ try_reconnect (struct GNUNET_FS_DownloadContext *dc)
1445 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Will try to reconnect in %s\n", 1445 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Will try to reconnect in %s\n",
1446 GNUNET_STRINGS_relative_time_to_string (dc->reconnect_backoff, GNUNET_YES)); 1446 GNUNET_STRINGS_relative_time_to_string (dc->reconnect_backoff, GNUNET_YES));
1447 dc->task = 1447 dc->task =
1448 GNUNET_SCHEDULER_add_delayed (dc->reconnect_backoff, 1448 GNUNET_SCHEDULER_add_delayed (dc->reconnect_backoff,
1449 &do_reconnect, 1449 &do_reconnect,
1450 dc); 1450 dc);
1451} 1451}
@@ -1539,7 +1539,7 @@ deactivate_fs_download (void *cls)
1539 * the specified depth 1539 * the specified depth
1540 */ 1540 */
1541static struct DownloadRequest * 1541static struct DownloadRequest *
1542create_download_request (struct DownloadRequest *parent, 1542create_download_request (struct DownloadRequest *parent,
1543 unsigned int chk_idx, 1543 unsigned int chk_idx,
1544 unsigned int depth, 1544 unsigned int depth,
1545 uint64_t dr_offset, uint64_t file_start_offset, 1545 uint64_t dr_offset, uint64_t file_start_offset,
@@ -1558,7 +1558,7 @@ create_download_request (struct DownloadRequest *parent,
1558 if (0 == depth) 1558 if (0 == depth)
1559 return dr; 1559 return dr;
1560 child_block_size = GNUNET_FS_tree_compute_tree_size (depth - 1); 1560 child_block_size = GNUNET_FS_tree_compute_tree_size (depth - 1);
1561 1561
1562 /* calculate how many blocks at this level are not interesting 1562 /* calculate how many blocks at this level are not interesting
1563 * from the start (rounded down), either because of the requested 1563 * from the start (rounded down), either because of the requested
1564 * file offset or because this IBlock is further along */ 1564 * file offset or because this IBlock is further along */
@@ -1570,7 +1570,7 @@ create_download_request (struct DownloadRequest *parent,
1570 { 1570 {
1571 head_skip = 0; 1571 head_skip = 0;
1572 } 1572 }
1573 1573
1574 /* calculate index of last block at this level that is interesting (rounded up) */ 1574 /* calculate index of last block at this level that is interesting (rounded up) */
1575 dr->num_children = (file_start_offset + desired_length - dr_offset) / child_block_size; 1575 dr->num_children = (file_start_offset + desired_length - dr_offset) / child_block_size;
1576 if (dr->num_children * child_block_size < 1576 if (dr->num_children * child_block_size <
@@ -1585,12 +1585,12 @@ create_download_request (struct DownloadRequest *parent,
1585 (unsigned long long) dr_offset, 1585 (unsigned long long) dr_offset,
1586 depth, 1586 depth,
1587 dr->num_children); 1587 dr->num_children);
1588 1588
1589 /* now we can get the total number of *interesting* children for this block */ 1589 /* now we can get the total number of *interesting* children for this block */
1590 1590
1591 /* why else would we have gotten here to begin with? (that'd be a bad logic error) */ 1591 /* why else would we have gotten here to begin with? (that'd be a bad logic error) */
1592 GNUNET_assert (dr->num_children > 0); 1592 GNUNET_assert (dr->num_children > 0);
1593 1593
1594 dr->children = 1594 dr->children =
1595 GNUNET_malloc (dr->num_children * sizeof (struct DownloadRequest *)); 1595 GNUNET_malloc (dr->num_children * sizeof (struct DownloadRequest *));
1596 for (i = 0; i < dr->num_children; i++) 1596 for (i = 0; i < dr->num_children; i++)
@@ -1616,7 +1616,7 @@ reconstruct_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1616{ 1616{
1617 struct GNUNET_FS_DownloadContext *dc = cls; 1617 struct GNUNET_FS_DownloadContext *dc = cls;
1618 1618
1619 /* clean up state from tree encoder */ 1619 /* clean up state from tree encoder */
1620 if (dc->task != GNUNET_SCHEDULER_NO_TASK) 1620 if (dc->task != GNUNET_SCHEDULER_NO_TASK)
1621 { 1621 {
1622 GNUNET_SCHEDULER_cancel (dc->task); 1622 GNUNET_SCHEDULER_cancel (dc->task);
@@ -1965,7 +1965,7 @@ GNUNET_FS_download_start_task_ (void *cls,
1965 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1965 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1966 "Trying bottom-up reconstruction of file `%s'\n", dc->filename); 1966 "Trying bottom-up reconstruction of file `%s'\n", dc->filename);
1967 dc->te = 1967 dc->te =
1968 GNUNET_FS_tree_encoder_create (dc->h, 1968 GNUNET_FS_tree_encoder_create (dc->h,
1969 GNUNET_FS_uri_chk_get_file_size (dc->uri), 1969 GNUNET_FS_uri_chk_get_file_size (dc->uri),
1970 dc, &fh_reader, 1970 dc, &fh_reader,
1971 &reconstruct_cb, NULL, 1971 &reconstruct_cb, NULL,
@@ -2116,7 +2116,7 @@ create_download_context (struct GNUNET_FS_Handle *h,
2116 else 2116 else
2117 dc->temp_filename = GNUNET_DISK_mktemp ("gnunet-directory-download-tmp"); 2117 dc->temp_filename = GNUNET_DISK_mktemp ("gnunet-directory-download-tmp");
2118 } 2118 }
2119 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2119 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2120 "Starting download `%s' of %llu bytes with tree depth %u\n", 2120 "Starting download `%s' of %llu bytes with tree depth %u\n",
2121 filename, 2121 filename,
2122 (unsigned long long) length, 2122 (unsigned long long) length,
@@ -2267,7 +2267,7 @@ GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext *dc)
2267 GNUNET_FS_queue_ (dc->h, &activate_fs_download, &deactivate_fs_download, 2267 GNUNET_FS_queue_ (dc->h, &activate_fs_download, &deactivate_fs_download,
2268 dc, (dc->length + DBLOCK_SIZE - 1) / DBLOCK_SIZE, 2268 dc, (dc->length + DBLOCK_SIZE - 1) / DBLOCK_SIZE,
2269 (0 == (dc->options & GNUNET_FS_DOWNLOAD_IS_PROBE)) 2269 (0 == (dc->options & GNUNET_FS_DOWNLOAD_IS_PROBE))
2270 ? GNUNET_FS_QUEUE_PRIORITY_NORMAL 2270 ? GNUNET_FS_QUEUE_PRIORITY_NORMAL
2271 : GNUNET_FS_QUEUE_PRIORITY_PROBE); 2271 : GNUNET_FS_QUEUE_PRIORITY_PROBE);
2272 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2272 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2273 "Download %p put into queue as job %p\n", 2273 "Download %p put into queue as job %p\n",