gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r37006 - in gnunet-gtk/src: fs identity lib main namestore


From: gnunet
Subject: [GNUnet-SVN] r37006 - in gnunet-gtk/src: fs identity lib main namestore peerinfo setup
Date: Sun, 10 Apr 2016 01:14:09 +0200

Author: grothoff
Date: 2016-04-10 01:14:09 +0200 (Sun, 10 Apr 2016)
New Revision: 37006

Modified:
   gnunet-gtk/src/fs/Makefile.am
   gnunet-gtk/src/fs/gnunet-fs-gtk.c
   gnunet-gtk/src/fs/gnunet-fs-gtk_main-window-search.c
   gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c
   gnunet-gtk/src/identity/gnunet-identity-gtk.c
   gnunet-gtk/src/lib/animations.c
   gnunet-gtk/src/lib/eventloop.c
   gnunet-gtk/src/lib/glade.c
   gnunet-gtk/src/lib/os_installation.c
   gnunet-gtk/src/main/gnunet-gtk.c
   gnunet-gtk/src/namestore/Makefile.am
   gnunet-gtk/src/namestore/gnunet-namestore-gtk.c
   gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk-flags.c
   gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk.c
   gnunet-gtk/src/setup/gnunet-setup-transport.c
   gnunet-gtk/src/setup/gnunet-setup.c
   gnunet-gtk/src/setup/gnunet-setup.h
Log:
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()

Modified: gnunet-gtk/src/fs/Makefile.am
===================================================================
--- gnunet-gtk/src/fs/Makefile.am       2016-04-09 23:14:03 UTC (rev 37005)
+++ gnunet-gtk/src/fs/Makefile.am       2016-04-09 23:14:09 UTC (rev 37006)
@@ -45,7 +45,7 @@
 gnunet_fs_gtk_LDFLAGS = \
   -export-dynamic
 
-pkgcfgdir= $(prefix)/share/gnunet-gtk/config.d/
+pkgcfgdir= $(prefix)/share/gnunet/config.d/
 
 pkgcfg_DATA = \
   gnunet-fs-gtk.conf
@@ -52,4 +52,3 @@
 
 EXTRA_DIST = metatypes.c \
  $(pkgcfg_DATA)
-

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk.c   2016-04-09 23:14:03 UTC (rev 37005)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk.c   2016-04-09 23:14:09 UTC (rev 37006)
@@ -233,11 +233,9 @@
  * Task run on shutdown.
  *
  * @param cls NULL
- * @param tc scheduler context, unused
  */
 static void
-shutdown_task (void *cls,
-               const struct GNUNET_SCHEDULER_TaskContext *tc)
+shutdown_task (void *cls)
 {
   struct SearchLookup *sl;
   struct PseuLookupContext *lctx;
@@ -678,11 +676,9 @@
  * is initialized.  Initializes up GTK and Glade.
  *
  * @param cls handle to the main loop (`struct GNUNET_GTK_MainLoop`)
- * @param tc scheduler context, unused
  */
 static void
-run (void *cls,
-     const struct GNUNET_SCHEDULER_TaskContext *tc)
+run (void *cls)
 {
   unsigned long long dl_parallel;
   unsigned long long req_parallel;

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_main-window-search.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_main-window-search.c        2016-04-09 
23:14:03 UTC (rev 37005)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_main-window-search.c        2016-04-09 
23:14:09 UTC (rev 37006)
@@ -84,11 +84,9 @@
  * the GNS namespace times out.
  *
  * @param cls the 'struct SearchLookup'
- * @param tc scheduler context
  */
 static void
-timeout_search_lookup (void *cls,
-                      const struct GNUNET_SCHEDULER_TaskContext *tc)
+timeout_search_lookup (void *cls)
 {
   struct SearchLookup *sl = cls;
 
@@ -302,11 +300,9 @@
  * Asynchronously clean up PseuLookupContext.
  *
  * @param cls the `struct PseuLookupContext` to clean up.
- * @param tc scheduler context
  */
 static void
-end_pseu_lookup (void *cls,
-                const struct GNUNET_SCHEDULER_TaskContext *tc)
+end_pseu_lookup (void *cls)
 {
   struct PseuLookupContext *lctx = cls;
 

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c    2016-04-09 23:14:03 UTC 
(rev 37005)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c    2016-04-09 23:14:09 UTC 
(rev 37006)
@@ -1457,11 +1457,9 @@
  * in a separate task).
  *
  * @param cls  progress dialog context of our window
- * @param tc scheduler context, unused
  */
 static void
-stop_scanner_task (void *cls,
-                  const struct GNUNET_SCHEDULER_TaskContext *tc)
+stop_scanner_task (void *cls)
 {
   struct AddDirClientContext *adcc = cls;
 

Modified: gnunet-gtk/src/identity/gnunet-identity-gtk.c
===================================================================
--- gnunet-gtk/src/identity/gnunet-identity-gtk.c       2016-04-09 23:14:03 UTC 
(rev 37005)
+++ gnunet-gtk/src/identity/gnunet-identity-gtk.c       2016-04-09 23:14:09 UTC 
(rev 37006)
@@ -379,10 +379,9 @@
  * Task run on shutdown.
  *
  * @param cls unused
- * @param tc scheduler context, unused
  */
 static void
-shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+shutdown_task (void *cls)
 {
   struct OperationContext *oc;
 
@@ -496,10 +495,9 @@
  * is initialized.  Initializes up GTK and Glade.
  *
  * @param cls NULL
- * @param tc schedule context
  */
 static void
-run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+run (void *cls)
 {
   GtkWidget *main_window;
   GtkTreeIter iter;

Modified: gnunet-gtk/src/lib/animations.c
===================================================================
--- gnunet-gtk/src/lib/animations.c     2016-04-09 23:14:03 UTC (rev 37005)
+++ gnunet-gtk/src/lib/animations.c     2016-04-09 23:14:09 UTC (rev 37006)
@@ -261,11 +261,9 @@
  * Task run periodically to advance all of our animations.
  *
  * @param cls closure, unused
- * @param tc scheduler context, unused
  */
 static void
-ticker (void *cls,
-       const struct GNUNET_SCHEDULER_TaskContext *tc)
+ticker (void *cls)
 {
   struct GNUNET_GTK_AnimationContext *pos;
   struct GNUNET_GTK_AnimationTreeViewHandle *atv;

Modified: gnunet-gtk/src/lib/eventloop.c
===================================================================
--- gnunet-gtk/src/lib/eventloop.c      2016-04-09 23:14:03 UTC (rev 37005)
+++ gnunet-gtk/src/lib/eventloop.c      2016-04-09 23:14:09 UTC (rev 37006)
@@ -323,10 +323,9 @@
  * Task to run Gtk events (within a GNUnet scheduler task).
  *
  * @param cls the main loop handle
- * @param tc scheduler context
  */
 static void
-dispatch_gtk_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+dispatch_gtk_task (void *cls)
 {
   struct GNUNET_GTK_MainLoop *ml = cls;
 
@@ -355,7 +354,7 @@
  * Dummy task to keep our scheduler running.
  */
 static void
-keepalive_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+keepalive_task (void *cls)
 {
   struct GNUNET_GTK_MainLoop *ml = cls;
 
@@ -854,8 +853,8 @@
   GNUNET_asprintf (&baseconfig, "%s%s", ipath, "config.d");
   (void) GNUNET_CONFIGURATION_load_from (gcfg, baseconfig);
   GNUNET_free (baseconfig);
-
-  if (NULL == (ipath2 = GNUNET_GTK_installation_get_path 
(GNUNET_OS_IPK_DATADIR)))
+  /* FIXME: this was supposed to search the GTK-IPK, so the logic here is 
badly broken now */
+  if (NULL == (ipath2 = GNUNET_OS_installation_get_path 
(GNUNET_OS_IPK_DATADIR)))
   {
     GNUNET_break (0);
     return;

Modified: gnunet-gtk/src/lib/glade.c
===================================================================
--- gnunet-gtk/src/lib/glade.c  2016-04-09 23:14:03 UTC (rev 37005)
+++ gnunet-gtk/src/lib/glade.c  2016-04-09 23:14:09 UTC (rev 37006)
@@ -35,7 +35,7 @@
 {
   char *buf;
 
-  buf = GNUNET_GTK_installation_get_path (GNUNET_OS_IPK_ICONDIR);
+  buf = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_ICONDIR);
   gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (), buf);
   GNUNET_free (buf);
 }
@@ -53,7 +53,7 @@
   static char *dd;
 
   if (dd == NULL)
-    dd = GNUNET_GTK_installation_get_path (GNUNET_OS_IPK_DATADIR);
+    dd = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DATADIR);
   return dd;
 }
 

Modified: gnunet-gtk/src/lib/os_installation.c
===================================================================
--- gnunet-gtk/src/lib/os_installation.c        2016-04-09 23:14:03 UTC (rev 
37005)
+++ gnunet-gtk/src/lib/os_installation.c        2016-04-09 23:14:09 UTC (rev 
37006)
@@ -31,7 +31,7 @@
  */
 static const struct GNUNET_OS_ProjectData gtk_pd = {
   .libname = "libgnunetgtk",
-  .project_dirname = "gnunet-gtk",
+  .project_dirname = "gnunet",
   .binary_name = "gnunet-fs-gtk",
   .env_varname = "GNUNET_GTK_PREFIX",
   .env_varname_alt = "GNUNET_PREFIX",

Modified: gnunet-gtk/src/main/gnunet-gtk.c
===================================================================
--- gnunet-gtk/src/main/gnunet-gtk.c    2016-04-09 23:14:03 UTC (rev 37005)
+++ gnunet-gtk/src/main/gnunet-gtk.c    2016-04-09 23:14:09 UTC (rev 37006)
@@ -127,11 +127,9 @@
  * Actual main to tear down the system.
  *
  * @param cls the main loop handle
- * @param tc scheduler context
  */
 static void
-cleanup_task (void *cls,
-              const struct GNUNET_SCHEDULER_TaskContext *tc)
+cleanup_task (void *cls)
 {
   struct Plug *p;
 
@@ -213,11 +211,9 @@
  * Restart crashed plugin process.
  *
  * @param cls the `struct Plug` of the plugin
- * @param tc scheduler context
  */
 static void
-restart_process (void *cls,
-                 const struct GNUNET_SCHEDULER_TaskContext *tc)
+restart_process (void *cls)
 {
   struct Plug *p = cls;
 
@@ -307,11 +303,9 @@
  * Actual main method that sets up the configuration window.
  *
  * @param cls the main loop handle
- * @param tc scheduler context
  */
 static void
-run (void *cls,
-     const struct GNUNET_SCHEDULER_TaskContext *tc)
+run (void *cls)
 {
   GtkWidget *main_window;
 

Modified: gnunet-gtk/src/namestore/Makefile.am
===================================================================
--- gnunet-gtk/src/namestore/Makefile.am        2016-04-09 23:14:03 UTC (rev 
37005)
+++ gnunet-gtk/src/namestore/Makefile.am        2016-04-09 23:14:09 UTC (rev 
37006)
@@ -1,10 +1,8 @@
 # This Makefile.am is in the public domain
 SUBDIRS = .
 
-# we use libgnunetutil to load plugins, and it
-# only looks in /gnunet, not /gnunet-gtk!
 plugindir = $(libdir)/gnunet
-pkgcfgdir= $(prefix)/share/gnunet-gtk/config.d/
+pkgcfgdir= $(prefix)/share/gnunet/config.d/
 
 AM_CPPFLAGS = \
   -I$(top_srcdir)/ \

Modified: gnunet-gtk/src/namestore/gnunet-namestore-gtk.c
===================================================================
--- gnunet-gtk/src/namestore/gnunet-namestore-gtk.c     2016-04-09 23:14:03 UTC 
(rev 37005)
+++ gnunet-gtk/src/namestore/gnunet-namestore-gtk.c     2016-04-09 23:14:09 UTC 
(rev 37006)
@@ -2591,11 +2591,9 @@
  * Actual main to tear down the system.
  *
  * @param cls the main loop handle
- * @param tc scheduler context
  */
 static void
-cleanup_task (void *cls,
-              const struct GNUNET_SCHEDULER_TaskContext *tc)
+cleanup_task (void *cls)
 {
   struct OperationContext *oc;
   struct MoveOperationContext *moc;
@@ -2775,11 +2773,9 @@
  * Actual main method that sets up the configuration window.
  *
  * @param cls the main loop handle
- * @param tc scheduler context
  */
 static void
-run (void *cls,
-     const struct GNUNET_SCHEDULER_TaskContext *tc)
+run (void *cls)
 {
   gchar *label;
   GtkLabel *status_label;

Modified: gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk-flags.c
===================================================================
--- gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk-flags.c 2016-04-09 23:14:03 UTC 
(rev 37005)
+++ gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk-flags.c 2016-04-09 23:14:09 UTC 
(rev 37006)
@@ -99,7 +99,7 @@
   mcc = GNUNET_strdup (cc);
   for (i = 0; i < strlen (mcc); i++)
     mcc[i] = tolower (mcc[i]);
-  dir = GNUNET_GTK_installation_get_path (GNUNET_OS_IPK_DATADIR);
+  dir = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DATADIR);
   GNUNET_asprintf (&fn, "%sflags%s%s.png", dir,
                    DIR_SEPARATOR_STR, mcc);
   GNUNET_free (dir);

Modified: gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk.c
===================================================================
--- gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk.c       2016-04-09 23:14:03 UTC 
(rev 37005)
+++ gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk.c       2016-04-09 23:14:09 UTC 
(rev 37006)
@@ -1465,7 +1465,7 @@
   char *dir;
   char *fn;
 
-  dir = GNUNET_GTK_installation_get_path (GNUNET_OS_IPK_DATADIR);
+  dir = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DATADIR);
   GNUNET_asprintf (&fn, "%s%s.png", dir,
                    color);
   GNUNET_free (dir);

Modified: gnunet-gtk/src/setup/gnunet-setup-transport.c
===================================================================
--- gnunet-gtk/src/setup/gnunet-setup-transport.c       2016-04-09 23:14:03 UTC 
(rev 37005)
+++ gnunet-gtk/src/setup/gnunet-setup-transport.c       2016-04-09 23:14:09 UTC 
(rev 37006)
@@ -197,11 +197,9 @@
  * Main function for the connection reversal test.
  *
  * @param cls the 'int*' for the result
- * @param tc scheduler context
  */
 static void
-reversal_test (void *cls,
-               const struct GNUNET_SCHEDULER_TaskContext *tc)
+reversal_test (void *cls)
 {
   struct GNUNET_SetupAutoContext *ac = cls;
 

Modified: gnunet-gtk/src/setup/gnunet-setup.c
===================================================================
--- gnunet-gtk/src/setup/gnunet-setup.c 2016-04-09 23:14:03 UTC (rev 37005)
+++ gnunet-gtk/src/setup/gnunet-setup.c 2016-04-09 23:14:09 UTC (rev 37006)
@@ -364,10 +364,9 @@
  * Method run on shutdown.
  *
  * @param cls the main loop handle
- * @param tc scheduler context
  */
 static void
-cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+cleanup_task (void *cls)
 {
   if (NULL == ml)
   {
@@ -406,11 +405,9 @@
  *
  *
  * @param cls closure (unused)
- * @param tc scheduler context (unused)
  */
 void
-GNUNET_SETUP_restart_namestore (void *cls,
-                               const struct GNUNET_SCHEDULER_TaskContext *tc)
+GNUNET_SETUP_restart_namestore (void *cls)
 {
   if (GNUNET_OK != write_configuration ())
     return; /* no point in re-starting namestore ... */
@@ -584,11 +581,9 @@
  * Actual main method that sets up the configuration window.
  *
  * @param cls the main loop handle
- * @param tc scheduler context
  */
 static void
-run (void *cls,
-     const struct GNUNET_SCHEDULER_TaskContext *tc)
+run (void *cls)
 {
   GtkWidget *main_window;
 #ifndef MINGW

Modified: gnunet-gtk/src/setup/gnunet-setup.h
===================================================================
--- gnunet-gtk/src/setup/gnunet-setup.h 2016-04-09 23:14:03 UTC (rev 37005)
+++ gnunet-gtk/src/setup/gnunet-setup.h 2016-04-09 23:14:09 UTC (rev 37006)
@@ -65,11 +65,9 @@
  *
  *
  * @param cls closure (unused)
- * @param tc scheduler context (unused)
  */
 void
-GNUNET_SETUP_restart_namestore (void *cls,
-                               const struct GNUNET_SCHEDULER_TaskContext *tc);
+GNUNET_SETUP_restart_namestore (void *cls);
 
 /**
  * Our configuration.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]