2002-02-01 Marcus Brinkmann <marcus@g10code.de>
authorMarcus Brinkmann <mb@g10code.com>
Fri, 1 Feb 2002 18:10:19 +0000 (18:10 +0000)
committerMarcus Brinkmann <mb@g10code.com>
Fri, 1 Feb 2002 18:10:19 +0000 (18:10 +0000)
* engine-gpgsm.c (gpgsm_status_handler): At error, terminate the
connection to the server.

gpgme/ChangeLog
gpgme/engine-gpgsm.c

index 8f0f1e3..87ab87b 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-01  Marcus Brinkmann  <marcus@g10code.de>
+
+       * engine-gpgsm.c (gpgsm_status_handler): At error, terminate the
+       connection to the server.
+
 2002-01-31  Marcus Brinkmann  <marcus@g10code.de>
 
        * rungpg.h: Add STATUS_KEY_CREATED.
index 51e62fd..b4e0d83 100644 (file)
@@ -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;
        }