aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/fs/download.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/fs/download.c')
-rw-r--r--src/plugins/fs/download.c47
1 files changed, 22 insertions, 25 deletions
diff --git a/src/plugins/fs/download.c b/src/plugins/fs/download.c
index a7868f2c..fdde54ca 100644
--- a/src/plugins/fs/download.c
+++ b/src/plugins/fs/download.c
@@ -146,7 +146,7 @@ refreshDirectoryViewFromDisk (DownloadList * list)
146 meta = NULL; 146 meta = NULL;
147 GNUNET_ECRS_directory_list_contents (ectx, data, size, &meta, 147 GNUNET_ECRS_directory_list_contents (ectx, data, size, &meta,
148 &addFilesToDirectory, list); 148 &addFilesToDirectory, list);
149 MUNMAP ((void*)data, size); 149 MUNMAP ((void *) data, size);
150 CLOSE (fd); 150 CLOSE (fd);
151 if (meta != NULL) 151 if (meta != NULL)
152 GNUNET_ECRS_meta_data_destroy (meta); 152 GNUNET_ECRS_meta_data_destroy (meta);
@@ -189,8 +189,8 @@ fs_download_started (struct GNUNET_FSUI_DownloadList *fsui_dl,
189 if ((dl_parent != NULL) && 189 if ((dl_parent != NULL) &&
190 (NULL != 190 (NULL !=
191 (path = 191 (path =
192 gtk_tree_row_reference_get_path (dl_parent-> 192 gtk_tree_row_reference_get_path
193 summaryViewRowReference)))) 193 (dl_parent->summaryViewRowReference))))
194 { 194 {
195 valid = gtk_tree_model_get_iter (GTK_TREE_MODEL (download_summary), 195 valid = gtk_tree_model_get_iter (GTK_TREE_MODEL (download_summary),
196 &piter, path); 196 &piter, path);
@@ -246,13 +246,12 @@ fs_download_started (struct GNUNET_FSUI_DownloadList *fsui_dl,
246 solution is to #ifndef it */ 246 solution is to #ifndef it */
247#ifndef MINGW 247#ifndef MINGW
248 GNUNET_GE_BREAK (ectx, 248 GNUNET_GE_BREAK (ectx,
249 gtk_tree_row_reference_get_model (dl_parent-> 249 gtk_tree_row_reference_get_model
250 searchViewRowReference) 250 (dl_parent->searchViewRowReference) == model);
251 == model);
252#endif 251#endif
253 path = 252 path =
254 gtk_tree_row_reference_get_path (dl_parent-> 253 gtk_tree_row_reference_get_path
255 searchViewRowReference); 254 (dl_parent->searchViewRowReference);
256 if (path != NULL) 255 if (path != NULL)
257 { 256 {
258 valid = gtk_tree_model_get_iter (model, &piter, path); 257 valid = gtk_tree_model_get_iter (model, &piter, path);
@@ -370,8 +369,8 @@ fs_download_completed (DownloadList * downloadContext)
370 if (downloadContext->searchViewRowReference != NULL) 369 if (downloadContext->searchViewRowReference != NULL)
371 { 370 {
372 path = 371 path =
373 gtk_tree_row_reference_get_path (downloadContext-> 372 gtk_tree_row_reference_get_path
374 searchViewRowReference); 373 (downloadContext->searchViewRowReference);
375 gtk_tree_model_get_iter (GTK_TREE_MODEL 374 gtk_tree_model_get_iter (GTK_TREE_MODEL
376 (downloadContext->searchList->tree), &iter, 375 (downloadContext->searchList->tree), &iter,
377 path); 376 path);
@@ -401,8 +400,8 @@ fs_download_aborted (DownloadList * downloadContext)
401 if (downloadContext->searchViewRowReference != NULL) 400 if (downloadContext->searchViewRowReference != NULL)
402 { 401 {
403 path = 402 path =
404 gtk_tree_row_reference_get_path (downloadContext-> 403 gtk_tree_row_reference_get_path
405 searchViewRowReference); 404 (downloadContext->searchViewRowReference);
406 gtk_tree_model_get_iter (GTK_TREE_MODEL 405 gtk_tree_model_get_iter (GTK_TREE_MODEL
407 (downloadContext->searchList->tree), &iter, 406 (downloadContext->searchList->tree), &iter,
408 path); 407 path);
@@ -633,9 +632,8 @@ initiateDownload (GtkTreeModel * model,
633 strlen (GNUNET_ECRS_FILE_INFIX)); 632 strlen (GNUNET_ECRS_FILE_INFIX));
634 GNUNET_free_non_null (idc_name); 633 GNUNET_free_non_null (idc_name);
635 filehash = 634 filehash =
636 GNUNET_strdup (&sdc. 635 GNUNET_strdup (&sdc.uri_name[strlen (GNUNET_ECRS_URI_PREFIX) +
637 uri_name[strlen (GNUNET_ECRS_URI_PREFIX) + 636 strlen (GNUNET_ECRS_FILE_INFIX)]);
638 strlen (GNUNET_ECRS_FILE_INFIX)]);
639 filehash[16] = 0; 637 filehash[16] = 0;
640 idc_name = GNUNET_strdup (filehash); 638 idc_name = GNUNET_strdup (filehash);
641 GNUNET_free_non_null (filehash); 639 GNUNET_free_non_null (filehash);
@@ -646,9 +644,8 @@ initiateDownload (GtkTreeModel * model,
646 strlen (GNUNET_ECRS_FILE_INFIX)); 644 strlen (GNUNET_ECRS_FILE_INFIX));
647 GNUNET_free_non_null (idc_name); 645 GNUNET_free_non_null (idc_name);
648 idc_name = 646 idc_name =
649 GNUNET_strdup (&sdc. 647 GNUNET_strdup (&sdc.uri_name[strlen (GNUNET_ECRS_URI_PREFIX) +
650 uri_name[strlen (GNUNET_ECRS_URI_PREFIX) + 648 strlen (GNUNET_ECRS_FILE_INFIX)]);
651 strlen (GNUNET_ECRS_FILE_INFIX)]);
652#endif 649#endif
653 } 650 }
654 651
@@ -725,10 +722,10 @@ initiateDownload (GtkTreeModel * model,
725 GNUNET_malloc (strlen (final_download_dir) + 2 + strlen (idc_name) + 722 GNUNET_malloc (strlen (final_download_dir) + 2 + strlen (idc_name) +
726 strlen (GNUNET_DIRECTORY_EXT) + strlen (dirPath)); 723 strlen (GNUNET_DIRECTORY_EXT) + strlen (dirPath));
727 strcpy (sdc.idc_final_download_destination, final_download_dir); 724 strcpy (sdc.idc_final_download_destination, final_download_dir);
728 if (sdc. 725 if (sdc.idc_final_download_destination[strlen
729 idc_final_download_destination[strlen 726 (sdc.
730 (sdc.idc_final_download_destination) - 727 idc_final_download_destination) -
731 1] != DIR_SEPARATOR) 728 1] != DIR_SEPARATOR)
732 strcat (sdc.idc_final_download_destination, DIR_SEPARATOR_STR); 729 strcat (sdc.idc_final_download_destination, DIR_SEPARATOR_STR);
733 strcat (sdc.idc_final_download_destination, dirPath); 730 strcat (sdc.idc_final_download_destination, dirPath);
734 strcat (sdc.idc_final_download_destination, idc_name); 731 strcat (sdc.idc_final_download_destination, idc_name);
@@ -826,9 +823,9 @@ on_statusDownloadURIEntry_editing_done_fs (GtkWidget * entry,
826 GNUNET_malloc (strlen (final_download_dir) + strlen (dname) + 2); 823 GNUNET_malloc (strlen (final_download_dir) + strlen (dname) + 2);
827 strcpy (sdc.idc_final_download_destination, final_download_dir); 824 strcpy (sdc.idc_final_download_destination, final_download_dir);
828 GNUNET_free (final_download_dir); 825 GNUNET_free (final_download_dir);
829 if (sdc. 826 if (sdc.idc_final_download_destination[strlen
830 idc_final_download_destination[strlen 827 (sdc.
831 (sdc.idc_final_download_destination)] != 828 idc_final_download_destination)] !=
832 DIR_SEPARATOR) 829 DIR_SEPARATOR)
833 strcat (sdc.idc_final_download_destination, DIR_SEPARATOR_STR); 830 strcat (sdc.idc_final_download_destination, DIR_SEPARATOR_STR);
834 strcat (sdc.idc_final_download_destination, dname); 831 strcat (sdc.idc_final_download_destination, dname);