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.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/plugins/fs/download.c b/src/plugins/fs/download.c
index 3defe98f..5abbd3ae 100644
--- a/src/plugins/fs/download.c
+++ b/src/plugins/fs/download.c
@@ -413,15 +413,14 @@ void on_clearCompletedDownloadsButton_clicked(void * unused,
413 NULL); 413 NULL);
414} 414}
415 415
416static void abortDownloadCallback(GtkTreeModel * model, 416static void * shutdownCode(void * it) {
417 GtkTreePath * path, 417 GtkTreeModel * model;
418 GtkTreeIter * iter, 418 GtkTreeIter * iter = it;
419 GtkTreeStore * tree) {
420 struct ECRS_URI * u; 419 struct ECRS_URI * u;
421 char * fn; 420 char * fn;
422 421
423 GNUNET_ASSERT(model == GTK_TREE_MODEL(summary)); 422 model = GTK_TREE_MODEL(summary);
424 gtk_tree_model_get(GTK_TREE_MODEL(summary), 423 gtk_tree_model_get(model,
425 iter, 424 iter,
426 DOWNLOAD_URI, &u, 425 DOWNLOAD_URI, &u,
427 DOWNLOAD_FILENAME, &fn, 426 DOWNLOAD_FILENAME, &fn,
@@ -433,6 +432,16 @@ static void abortDownloadCallback(GtkTreeModel * model,
433 iter); 432 iter);
434 if (u != NULL) 433 if (u != NULL)
435 ECRS_freeUri(u); 434 ECRS_freeUri(u);
435 return NULL;
436}
437
438static void abortDownloadCallback(GtkTreeModel * model,
439 GtkTreePath * path,
440 GtkTreeIter * iter,
441 GtkTreeStore * tree) {
442 GNUNET_ASSERT(model == GTK_TREE_MODEL(summary));
443 run_with_save_calls(&shutdownCode,
444 iter);
436} 445}
437 446
438void on_abortDownloadButton_clicked(void * unused, 447void on_abortDownloadButton_clicked(void * unused,