aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2002-02-01 18:10:19 +0000
committerMarcus Brinkmann <[email protected]>2002-02-01 18:10:19 +0000
commit3139e2b91a1f80ac0b80d99dff9030a6aff29d8f (patch)
treee98afbb307220cee2bb23090732324b7a738c131
parentReally add this file. (diff)
downloadgpgme-3139e2b91a1f80ac0b80d99dff9030a6aff29d8f.tar.gz
gpgme-3139e2b91a1f80ac0b80d99dff9030a6aff29d8f.zip
2002-02-01 Marcus Brinkmann <[email protected]>
* engine-gpgsm.c (gpgsm_status_handler): At error, terminate the connection to the server.
-rw-r--r--gpgme/ChangeLog5
-rw-r--r--gpgme/engine-gpgsm.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog
index 8f0f1e31..87ab87b0 100644
--- a/gpgme/ChangeLog
+++ b/gpgme/ChangeLog
@@ -1,3 +1,8 @@
+2002-02-01 Marcus Brinkmann <[email protected]>
+
+ * engine-gpgsm.c (gpgsm_status_handler): At error, terminate the
+ connection to the server.
+
2002-01-31 Marcus Brinkmann <[email protected]>
* rungpg.h: Add STATUS_KEY_CREATED.
diff --git a/gpgme/engine-gpgsm.c b/gpgme/engine-gpgsm.c
index 51e62fd9..b4e0d83c 100644
--- a/gpgme/engine-gpgsm.c
+++ b/gpgme/engine-gpgsm.c
@@ -549,6 +549,11 @@ gpgsm_status_handler (void *opaque, int pid, int fd)
/* FIXME Save error somewhere. */
if (gpgsm->status.fnc)
gpgsm->status.fnc (gpgsm->status.fnc_value, STATUS_EOF, "");
+
+ /* XXX: If an error occured, try our best to terminate the
+ connection. */
+ if (line[0] == 'E')
+ assuan_write_line (gpgsm->assuan_ctx, "BYE");
return 1;
}