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.

trunk/gpgme/ChangeLog
trunk/gpgme/engine-gpgsm.c

index 8f0f1e31b28695be5f070045a524628a1201c7ed..87ab87b076363ab7d40084b195d54ddcb3183071 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 51e62fd91ee27fef172bf05bed3f202227806d5c..b4e0d83cfe112e1aa9ff780389d5177ac56733fc 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;
        }