[svn] GnuPG - r3961 - trunk/g10
svn author dshaw
cvs at cvs.gnupg.org
Thu Dec 8 16:37:28 CET 2005
Author: dshaw
Date: 2005-12-08 16:37:26 +0100 (Thu, 08 Dec 2005)
New Revision: 3961
Modified:
trunk/g10/ChangeLog
trunk/g10/keyserver.c
Log:
* keyserver.c (keyserver_fetch): Switch on fast-import before we
--fetch-keys so we don't rebuild the trustdb after each fetch.
Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog 2005-12-08 07:42:41 UTC (rev 3960)
+++ trunk/g10/ChangeLog 2005-12-08 15:37:26 UTC (rev 3961)
@@ -1,3 +1,8 @@
+2005-12-08 David Shaw <dshaw at jabberwocky.com>
+
+ * keyserver.c (keyserver_fetch): Switch on fast-import before we
+ --fetch-keys so we don't rebuild the trustdb after each fetch.
+
2005-12-08 Werner Koch <wk at g10code.com>
* keyserver.c (keyserver_fetch): Made strings translatable.
Modified: trunk/g10/keyserver.c
===================================================================
--- trunk/g10/keyserver.c 2005-12-08 07:42:41 UTC (rev 3960)
+++ trunk/g10/keyserver.c 2005-12-08 15:37:26 UTC (rev 3961)
@@ -1822,7 +1822,13 @@
{
KEYDB_SEARCH_DESC desc;
STRLIST sl;
+ unsigned int options=opt.keyserver_options.import_options;
+ /* Switch on fast-import, since fetch can handle more than one
+ import and we don't want each set to rebuild the trustdb.
+ Instead we do it once at the end. */
+ opt.keyserver_options.import_options|=IMPORT_FAST;
+
/* A dummy desc since we're not actually fetching a particular key
ID */
memset(&desc,0,sizeof(desc));
@@ -1857,5 +1863,12 @@
log_info (_("WARNING: unable to parse URI %s\n"),sl->d);
}
+ opt.keyserver_options.import_options=options;
+
+ /* If the original options didn't have fast import, and the trustdb
+ is dirty, rebuild. */
+ if(!(opt.keyserver_options.import_options&IMPORT_FAST))
+ trustdb_check_or_update();
+
return 0;
}
More information about the Gnupg-commits
mailing list