From aff1ed3fb611e34e257c677fa7d0203fa9dd6f62 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Tue, 10 Nov 2009 18:05:04 +0000 Subject: [PATCH] 2009-11-10 Marcus Brinkmann * op-support.c (_gpgme_op_reset): Instead of last change, only set sub protocol if it is not the default. --- src/ChangeLog | 5 +++++ src/op-support.c | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 31cd1b0..d7af1d6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-11-10 Marcus Brinkmann + + * op-support.c (_gpgme_op_reset): Instead of last change, only set + sub protocol if it is not the default. + 2009-11-10 Werner Koch * op-support.c (_gpgme_op_reset): Ignore GPG_ERR_NOT_IMPLEMENTED diff --git a/src/op-support.c b/src/op-support.c index df54fc4..b3cf55e 100644 --- a/src/op-support.c +++ b/src/op-support.c @@ -130,11 +130,12 @@ _gpgme_op_reset (gpgme_ctx_t ctx, int type) } } - err = _gpgme_engine_set_protocol (ctx->engine, ctx->sub_protocol); - if (gpg_err_code (err) == GPG_ERR_NOT_IMPLEMENTED) - err = 0; - if (err) - return err; + if (ctx->sub_protocol != GPGME_PROTOCOL_DEFAULT) + { + err = _gpgme_engine_set_protocol (ctx->engine, ctx->sub_protocol); + if (err) + return err; + } if (type == 1 || (type == 2 && !ctx->io_cbs.add)) { -- 2.26.2