From: Marcus Brinkmann Date: Fri, 1 Feb 2002 18:10:19 +0000 (+0000) Subject: 2002-02-01 Marcus Brinkmann X-Git-Tag: gpgme-1.2.0@1385~1115 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e7687710e366856cbc7e1686e002c033f3ab9f12;p=gpgme.git 2002-02-01 Marcus Brinkmann * engine-gpgsm.c (gpgsm_status_handler): At error, terminate the connection to the server. --- 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; }