[svn] GnuPG - r4543 - trunk/tools
svn author marcus
cvs at cvs.gnupg.org
Mon Jul 16 16:34:09 CEST 2007
Author: marcus
Date: 2007-07-16 16:33:34 +0200 (Mon, 16 Jul 2007)
New Revision: 4543
Modified:
trunk/tools/ChangeLog
trunk/tools/gpg-connect-agent.c
Log:
2007-07-16 Marcus Brinkmann <marcus at g10code.de>
* gpg-connect-agent.c (main): Bail out if write fails.
Modified: trunk/tools/ChangeLog
===================================================================
--- trunk/tools/ChangeLog 2007-07-16 09:53:47 UTC (rev 4542)
+++ trunk/tools/ChangeLog 2007-07-16 14:33:34 UTC (rev 4543)
@@ -1,3 +1,7 @@
+2007-07-16 Marcus Brinkmann <marcus at g10code.de>
+
+ * gpg-connect-agent.c (main): Bail out if write fails.
+
2007-07-05 Marcus Brinkmann <marcus at g10code.de>
* symcryptrun.c (confucius_get_pass): Define orig_codeset if
Modified: trunk/tools/gpg-connect-agent.c
===================================================================
--- trunk/tools/gpg-connect-agent.c 2007-07-16 09:53:47 UTC (rev 4542)
+++ trunk/tools/gpg-connect-agent.c 2007-07-16 14:33:34 UTC (rev 4543)
@@ -258,7 +258,6 @@
}
-
/* gpg-connect-agent's entry point. */
int
main (int argc, char **argv)
@@ -464,7 +463,7 @@
if (rc)
{
log_info (_("sending line failed: %s\n"), gpg_strerror (rc) );
- continue;
+ break;
}
if (*line == '#' || !*line)
continue; /* Don't expect a response for a comment line. */
@@ -472,6 +471,12 @@
rc = read_and_print_response (ctx);
if (rc)
log_info (_("receiving line failed: %s\n"), gpg_strerror (rc) );
+
+ /* FIXME: If the last command was BYE or the server died for
+ some other reason, we won't notice until we get the next
+ input command. Probing the connection with a non-blocking
+ read could help to notice termination or other problems
+ early. */
}
if (opt.verbose)
More information about the Gnupg-commits
mailing list