diff options
Diffstat (limited to 'src/gpgme.c')
| -rw-r--r-- | src/gpgme.c | 21 | 
1 files changed, 15 insertions, 6 deletions
diff --git a/src/gpgme.c b/src/gpgme.c index b6c79a0d..7c523851 100644 --- a/src/gpgme.c +++ b/src/gpgme.c @@ -305,13 +305,22 @@ gpgme_get_protocol (gpgme_ctx_t ctx)  gpgme_error_t  gpgme_set_sub_protocol (gpgme_ctx_t ctx, gpgme_protocol_t protocol)  { -  gpgme_error_t err; -  TRACE_BEG2 (DEBUG_CTX, "gpgme_set_sub_protocol", ctx, "protocol=%i (%s)", -	      protocol, gpgme_get_protocol_name (protocol) -	      ? gpgme_get_protocol_name (protocol) : "invalid"); +  TRACE2 (DEBUG_CTX, "gpgme_set_sub_protocol", ctx, "protocol=%i (%s)", +	  protocol, gpgme_get_protocol_name (protocol) +	  ? gpgme_get_protocol_name (protocol) : "invalid"); +  ctx->sub_protocol = protocol; +  return 0; +} -  err = _gpgme_engine_set_protocol (ctx->engine, protocol); -  return TRACE_ERR (err); + +gpgme_error_t +gpgme_get_sub_protocol (gpgme_ctx_t ctx) +{ +  TRACE2 (DEBUG_CTX, "gpgme_get_sub_protocol", ctx, +	  "ctx->sub_protocol=%i (%s)", ctx->sub_protocol, +	  gpgme_get_protocol_name (ctx->sub_protocol) +	  ? gpgme_get_protocol_name (ctx->sub_protocol) : "invalid"); +  return ctx->sub_protocol;  }  | 
