[Gpa-commits] r856 - trunk/src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Mar 19 04:02:50 CET 2008


Author: marcus
Date: 2008-03-19 04:02:44 +0100 (Wed, 19 Mar 2008)
New Revision: 856

Modified:
   trunk/src/ChangeLog
   trunk/src/gpa.c
   trunk/src/gpgmetools.c
   trunk/src/options.c
Log:
2008-03-19  Marcus Brinkmann  <marcus at g10code.de>

	Reenable default key and keyserver handling:
	* options.c (gpa_options_update_default_key): Remove work-around.
	* gpgmetools.c (gpa_gpgme_new): Remove work-around
	* gpa.c (main): Remove work-around.


Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog	2008-03-19 02:49:35 UTC (rev 855)
+++ trunk/src/ChangeLog	2008-03-19 03:02:44 UTC (rev 856)
@@ -1,5 +1,10 @@
 2008-03-19  Marcus Brinkmann  <marcus at g10code.de>
 
+	Reenable default key and keyserver handling:
+	* options.c (gpa_options_update_default_key): Remove work-around.
+	* gpgmetools.c (gpa_gpgme_new): Remove work-around
+	* gpa.c (main): Remove work-around.
+
 	* fileman.c (open_file): Support opening more than one file.
 	(get_load_file_name): Likewise.
 	(add_file): Convert filenames to UTF-8 before comparison, fix tree

Modified: trunk/src/gpa.c
===================================================================
--- trunk/src/gpa.c	2008-03-19 02:49:35 UTC (rev 855)
+++ trunk/src/gpa.c	2008-03-19 03:02:44 UTC (rev 856)
@@ -400,17 +400,15 @@
   /* Read the list of available keyservers.  */
   keyserver_read_list (keyservers_configname);
 
-#if 0
+  gpa_options_update_default_key (gpa_options_get_instance ());
   /* Now, make sure there are reasonable defaults for the default key
     and keyserver.  */
-  gpa_options_update_default_key (gpa_options_get_instance ());
   if (!gpa_options_get_default_keyserver (gpa_options_get_instance ()))
     {
       GList *keyservers = keyserver_get_as_glist ();
       gpa_options_set_default_keyserver (gpa_options_get_instance (),
 					 keyservers->data);
     }
-#endif
 
   /* Fire up the server.  */
   gpa_start_server ();

Modified: trunk/src/gpgmetools.c
===================================================================
--- trunk/src/gpgmetools.c	2008-03-19 02:49:35 UTC (rev 855)
+++ trunk/src/gpgmetools.c	2008-03-19 03:02:44 UTC (rev 856)
@@ -87,13 +87,13 @@
   gpgme_ctx_t ctx;
   gpg_error_t err;
 
-  g_assert (!"using gpa_gpgme_new");
+  // g_assert (!"using gpa_gpgme_new");
   err = gpgme_new (&ctx);
   if (gpg_err_code (err) != GPG_ERR_NO_ERROR)
     {
       gpa_gpgme_error (err);
     }
-  if (!cms_hack)
+  if (! cms_hack)
     gpgme_set_passphrase_cb (ctx, gpa_passphrase_cb, NULL);
   
   return ctx;

Modified: trunk/src/options.c
===================================================================
--- trunk/src/options.c	2008-03-19 02:49:35 UTC (rev 855)
+++ trunk/src/options.c	2008-03-19 03:02:44 UTC (rev 856)
@@ -302,14 +302,10 @@
 {
   gboolean update = FALSE;
   gpgme_key_t key = NULL;
-  gpgme_ctx_t ctx /*= gpa_gpgme_new ()*/;
+  gpgme_ctx_t ctx = gpa_gpgme_new ();
 
-  return;
-
-  if (!options->default_key_fpr)
-    {
-      update = TRUE;
-    }
+  if (! options->default_key_fpr)
+    update = TRUE;
   else if (gpg_err_code (gpgme_get_key (ctx, options->default_key_fpr, 
 					&key, TRUE)) == GPG_ERR_EOF)
     {
@@ -324,13 +320,9 @@
       /* Use the listed key if there is no previous one (at initialization).
        */
       if (!options->default_key)
-	{
-	  options->default_key = key;
-	}
+	options->default_key = key;
       else
-	{
-	  gpgme_key_unref (key);
-	}
+	gpgme_key_unref (key);
     }
 
   if (update)
@@ -338,9 +330,7 @@
       key = determine_default_key ();
       gpa_options_set_default_key (options, key);
       if (key)
-	{
-	  gpgme_key_unref (key);
-	}
+	gpgme_key_unref (key);
     }
 
   gpgme_release (ctx);



More information about the Gpa-commits mailing list