From 0eddc867c31dd7239a1a9c4196bf8dc1372ea4b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Tue, 7 Dec 2021 11:13:59 +0100 Subject: [PATCH] cpp: Return engine info for engine used by the context lang/cpp/src/context.cpp (Context::engineInfo()): Return engine info for protocol of context. -- This change also fixes Context::setEngineFileName() and Context::setEngineHomeDirectory() which overwrote home dir resp. file name of the engine info for the protocol of context with the corresponding value of the "first" engine info (i.e. engine info for gpg) instead of keeping the current home dir resp. file name. GnuPG-bug-id: 5722 --- lang/cpp/src/context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/cpp/src/context.cpp b/lang/cpp/src/context.cpp index 7f027f1d..a46aa6d3 100644 --- a/lang/cpp/src/context.cpp +++ b/lang/cpp/src/context.cpp @@ -488,7 +488,7 @@ static GpgME::EngineInfo get_static_engine_info(gpgme_protocol_t protocol) EngineInfo Context::engineInfo() const { - return EngineInfo(gpgme_ctx_get_engine_info(d->ctx)); + return get_engine_info(gpgme_ctx_get_engine_info(d->ctx), gpgme_get_protocol(d->ctx)); } Error Context::setEngineFileName(const char *filename)