2004-03-11 Marcus Brinkmann <marcus@g10code.de>
authorMarcus Brinkmann <mb@g10code.com>
Wed, 10 Mar 2004 23:52:18 +0000 (23:52 +0000)
committerMarcus Brinkmann <mb@g10code.com>
Wed, 10 Mar 2004 23:52:18 +0000 (23:52 +0000)
* engine-gpgsm.c (gpgsm_cancel): Only call assuan_disconnect if
GPGSM->assuan_ctx is not NULL.  Set it to NULL afterwards.

gpgme/ChangeLog
gpgme/engine-gpgsm.c

index 38f8f433d4a5513124b0dfdaf472c07cc92f701c..248a1d1b61b4fad5b14cb798b55fec581aa6c526 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-11  Marcus Brinkmann  <marcus@g10code.de>
+
+       * engine-gpgsm.c (gpgsm_cancel): Only call assuan_disconnect if
+       GPGSM->assuan_ctx is not NULL.  Set it to NULL afterwards.
+
 2004-03-07  Marcus Brinkmann  <marcus@g10code.de>
 
        * gpgme-config.in: Do not emit include and lib directory for
index 11011318d97c941b9eb49fe0edcacbe7bc542456..bbcdb4251cd3882884ba326ae7e7eec4404bad2e 100644 (file)
@@ -289,7 +289,11 @@ gpgsm_cancel (void *engine)
   if (gpgsm->message_cb.fd != -1)
     _gpgme_io_close (gpgsm->message_cb.fd);
 
-  assuan_disconnect (gpgsm->assuan_ctx);
+  if (gpgsm->assuan_ctx)
+    {
+      assuan_disconnect (gpgsm->assuan_ctx);
+      gpgsm->assuan_ctx = NULL;
+    }
 
   return 0;
 }