[svn] GnuPG - r4470 - trunk/agent
svn author wk
cvs at cvs.gnupg.org
Tue Apr 3 20:43:01 CEST 2007
Author: wk
Date: 2007-04-03 20:43:00 +0200 (Tue, 03 Apr 2007)
New Revision: 4470
Modified:
trunk/agent/ChangeLog
trunk/agent/trustlist.c
Log:
* trustlist.c (read_trustfiles): Take a missing trustlist as an
empty one.
Modified: trunk/agent/ChangeLog
===================================================================
--- trunk/agent/ChangeLog 2007-04-03 16:57:37 UTC (rev 4469)
+++ trunk/agent/ChangeLog 2007-04-03 18:43:00 UTC (rev 4470)
@@ -1,3 +1,8 @@
+2007-04-03 Werner Koch <wk at g10code.com>
+
+ * trustlist.c (read_trustfiles): Take a missing trustlist as an
+ empty one.
+
2007-03-20 Werner Koch <wk at g10code.com>
* protect-tool.c: New option --p12-charset.
Modified: trunk/agent/trustlist.c
===================================================================
--- trunk/agent/trustlist.c 2007-04-03 16:57:37 UTC (rev 4469)
+++ trunk/agent/trustlist.c 2007-04-03 18:43:00 UTC (rev 4470)
@@ -275,7 +275,7 @@
}
-/* Read the trust files and update the global table on success. */
+/* Read the trust files and update the global table on success. */
static gpg_error_t
read_trustfiles (void)
{
@@ -313,6 +313,16 @@
if (err)
{
xfree (table);
+ if (gpg_err_code (err) == GPG_ERR_ENOENT)
+ {
+ /* Take a missing trustlist as an empty one. */
+ lock_trusttable ();
+ xfree (trusttable);
+ trusttable = NULL;
+ trusttablesize = 0;
+ unlock_trusttable ();
+ err = 0;
+ }
return err;
}
More information about the Gnupg-commits
mailing list