From 3139e2b91a1f80ac0b80d99dff9030a6aff29d8f Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Fri, 1 Feb 2002 18:10:19 +0000 Subject: [PATCH] 2002-02-01 Marcus Brinkmann * engine-gpgsm.c (gpgsm_status_handler): At error, terminate the connection to the server. --- gpgme/ChangeLog | 5 +++++ gpgme/engine-gpgsm.c | 5 +++++ 2 files changed, 10 insertions(+) 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 + + * engine-gpgsm.c (gpgsm_status_handler): At error, terminate the + connection to the server. + 2002-01-31 Marcus Brinkmann * 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; }