[svn] gpgme - r1173 - trunk/gpgme
svn author marcus
cvs at cvs.gnupg.org
Thu Jun 22 19:20:48 CEST 2006
Author: marcus
Date: 2006-06-22 19:20:47 +0200 (Thu, 22 Jun 2006)
New Revision: 1173
Modified:
trunk/gpgme/ChangeLog
trunk/gpgme/keylist.c
Log:
2006-06-22 Marcus Brinkmann <marcus at g10code.de>
* keylist.c (gpgme_get_key): Also clone the engine info.
Modified: trunk/gpgme/ChangeLog
===================================================================
--- trunk/gpgme/ChangeLog 2006-06-21 01:15:42 UTC (rev 1172)
+++ trunk/gpgme/ChangeLog 2006-06-22 17:20:47 UTC (rev 1173)
@@ -1,3 +1,7 @@
+2006-06-22 Marcus Brinkmann <marcus at g10code.de>
+
+ * keylist.c (gpgme_get_key): Also clone the engine info.
+
2006-03-06 Marcus Brinkmann <marcus at g10code.de>
* gpgme-config.in (cflags_pth): Revert accidential removal of
Modified: trunk/gpgme/keylist.c
===================================================================
--- trunk/gpgme/keylist.c 2006-06-21 01:15:42 UTC (rev 1172)
+++ trunk/gpgme/keylist.c 2006-06-22 17:20:47 UTC (rev 1173)
@@ -939,8 +939,22 @@
err = gpgme_new (&listctx);
if (err)
return err;
- gpgme_set_protocol (listctx, gpgme_get_protocol (ctx));
- gpgme_set_keylist_mode (listctx, ctx->keylist_mode);
+ {
+ gpgme_protocol_t proto;
+ gpgme_engine_info_t info;
+
+ /* Clone the relevant state. */
+ proto = gpgme_get_protocol (ctx);
+ gpgme_set_protocol (listctx, proto);
+ gpgme_set_keylist_mode (listctx, gpgme_get_keylist_mode (ctx));
+ info = gpgme_ctx_get_engine_info (ctx);
+ while (info && info->protocol != proto)
+ info = info->next;
+ if (info)
+ gpgme_ctx_set_engine_info (listctx, proto,
+ info->file_name, info->home_dir);
+ }
+
err = gpgme_op_keylist_start (listctx, fpr, secret);
if (!err)
err = gpgme_op_keylist_next (listctx, r_key);
More information about the Gnupg-commits
mailing list