From e7687710e366856cbc7e1686e002c033f3ab9f12 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. --- trunk/gpgme/ChangeLog | 5 +++++ trunk/gpgme/engine-gpgsm.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index 8f0f1e3..87ab87b 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/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/trunk/gpgme/engine-gpgsm.c b/trunk/gpgme/engine-gpgsm.c index 51e62fd..b4e0d83 100644 --- a/trunk/gpgme/engine-gpgsm.c +++ b/trunk/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; } -- 2.26.2