2009-11-10 Marcus Brinkmann <marcus@g10code.de>
[gpgme.git] / src / op-support.c
index df54fc4d5757d4b3761fcdbc8222cde1e3af7c3d..b3cf55ecc31ebdd5cd5f961df7da1401e725820b 100644 (file)
@@ -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))
     {