diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-04-09 23:14:09 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-04-09 23:14:09 +0000 |
commit | b25fa8589635010a74304dbca9678a3ca5cdfd7d (patch) | |
tree | 6ddc20fdc8b5c9158af3a60910f02040b877628c /src/fs | |
parent | b2f918a9a4fb089772cf4cc6eec0dc1f96bb3f09 (diff) | |
download | gnunet-gtk-b25fa8589635010a74304dbca9678a3ca5cdfd7d.tar.gz gnunet-gtk-b25fa8589635010a74304dbca9678a3ca5cdfd7d.zip |
small API change: do no longer pass rarely needed GNUNET_SCHEDULER_TaskContext to all scheduler tasks; instead, allow the relatively few tasks that need it to obtain the context via GNUNET_SCHEDULER_get_task_context()
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/Makefile.am | 3 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk.c | 8 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk_main-window-search.c | 8 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk_publish-dialog.c | 4 |
4 files changed, 6 insertions, 17 deletions
diff --git a/src/fs/Makefile.am b/src/fs/Makefile.am index f3e49a74..b011d7ca 100644 --- a/src/fs/Makefile.am +++ b/src/fs/Makefile.am | |||
@@ -45,11 +45,10 @@ gnunet_fs_gtk_LDADD = \ | |||
45 | gnunet_fs_gtk_LDFLAGS = \ | 45 | gnunet_fs_gtk_LDFLAGS = \ |
46 | -export-dynamic | 46 | -export-dynamic |
47 | 47 | ||
48 | pkgcfgdir= $(prefix)/share/gnunet-gtk/config.d/ | 48 | pkgcfgdir= $(prefix)/share/gnunet/config.d/ |
49 | 49 | ||
50 | pkgcfg_DATA = \ | 50 | pkgcfg_DATA = \ |
51 | gnunet-fs-gtk.conf | 51 | gnunet-fs-gtk.conf |
52 | 52 | ||
53 | EXTRA_DIST = metatypes.c \ | 53 | EXTRA_DIST = metatypes.c \ |
54 | $(pkgcfg_DATA) | 54 | $(pkgcfg_DATA) |
55 | |||
diff --git a/src/fs/gnunet-fs-gtk.c b/src/fs/gnunet-fs-gtk.c index 054fc7bc..58db7609 100644 --- a/src/fs/gnunet-fs-gtk.c +++ b/src/fs/gnunet-fs-gtk.c | |||
@@ -233,11 +233,9 @@ GNUNET_GTK_main_window_configure_event_cb (GtkWidget *main_window, | |||
233 | * Task run on shutdown. | 233 | * Task run on shutdown. |
234 | * | 234 | * |
235 | * @param cls NULL | 235 | * @param cls NULL |
236 | * @param tc scheduler context, unused | ||
237 | */ | 236 | */ |
238 | static void | 237 | static void |
239 | shutdown_task (void *cls, | 238 | shutdown_task (void *cls) |
240 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
241 | { | 239 | { |
242 | struct SearchLookup *sl; | 240 | struct SearchLookup *sl; |
243 | struct PseuLookupContext *lctx; | 241 | struct PseuLookupContext *lctx; |
@@ -678,11 +676,9 @@ handle_sks_zone_identity (void *cls, | |||
678 | * is initialized. Initializes up GTK and Glade. | 676 | * is initialized. Initializes up GTK and Glade. |
679 | * | 677 | * |
680 | * @param cls handle to the main loop (`struct GNUNET_GTK_MainLoop`) | 678 | * @param cls handle to the main loop (`struct GNUNET_GTK_MainLoop`) |
681 | * @param tc scheduler context, unused | ||
682 | */ | 679 | */ |
683 | static void | 680 | static void |
684 | run (void *cls, | 681 | run (void *cls) |
685 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
686 | { | 682 | { |
687 | unsigned long long dl_parallel; | 683 | unsigned long long dl_parallel; |
688 | unsigned long long req_parallel; | 684 | unsigned long long req_parallel; |
diff --git a/src/fs/gnunet-fs-gtk_main-window-search.c b/src/fs/gnunet-fs-gtk_main-window-search.c index 37339c30..3a2273d5 100644 --- a/src/fs/gnunet-fs-gtk_main-window-search.c +++ b/src/fs/gnunet-fs-gtk_main-window-search.c | |||
@@ -84,11 +84,9 @@ abort_search_lookup (struct SearchLookup *sl) | |||
84 | * the GNS namespace times out. | 84 | * the GNS namespace times out. |
85 | * | 85 | * |
86 | * @param cls the 'struct SearchLookup' | 86 | * @param cls the 'struct SearchLookup' |
87 | * @param tc scheduler context | ||
88 | */ | 87 | */ |
89 | static void | 88 | static void |
90 | timeout_search_lookup (void *cls, | 89 | timeout_search_lookup (void *cls) |
91 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
92 | { | 90 | { |
93 | struct SearchLookup *sl = cls; | 91 | struct SearchLookup *sl = cls; |
94 | 92 | ||
@@ -302,11 +300,9 @@ main_window_search_entry_key_press_event_cb (GtkWidget * widget, | |||
302 | * Asynchronously clean up PseuLookupContext. | 300 | * Asynchronously clean up PseuLookupContext. |
303 | * | 301 | * |
304 | * @param cls the `struct PseuLookupContext` to clean up. | 302 | * @param cls the `struct PseuLookupContext` to clean up. |
305 | * @param tc scheduler context | ||
306 | */ | 303 | */ |
307 | static void | 304 | static void |
308 | end_pseu_lookup (void *cls, | 305 | end_pseu_lookup (void *cls) |
309 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
310 | { | 306 | { |
311 | struct PseuLookupContext *lctx = cls; | 307 | struct PseuLookupContext *lctx = cls; |
312 | 308 | ||
diff --git a/src/fs/gnunet-fs-gtk_publish-dialog.c b/src/fs/gnunet-fs-gtk_publish-dialog.c index a171f32c..450083d7 100644 --- a/src/fs/gnunet-fs-gtk_publish-dialog.c +++ b/src/fs/gnunet-fs-gtk_publish-dialog.c | |||
@@ -1457,11 +1457,9 @@ add_share_items_to_treestore (struct AddDirClientContext *adcc, | |||
1457 | * in a separate task). | 1457 | * in a separate task). |
1458 | * | 1458 | * |
1459 | * @param cls progress dialog context of our window | 1459 | * @param cls progress dialog context of our window |
1460 | * @param tc scheduler context, unused | ||
1461 | */ | 1460 | */ |
1462 | static void | 1461 | static void |
1463 | stop_scanner_task (void *cls, | 1462 | stop_scanner_task (void *cls) |
1464 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1465 | { | 1463 | { |
1466 | struct AddDirClientContext *adcc = cls; | 1464 | struct AddDirClientContext *adcc = cls; |
1467 | 1465 | ||