diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/ChangeLog | 9 | ||||
-rw-r--r-- | tools/gpg-connect-agent.c | 14 |
2 files changed, 21 insertions, 2 deletions
diff --git a/tools/ChangeLog b/tools/ChangeLog index 81bad157b..1b4bad67c 100644 --- a/tools/ChangeLog +++ b/tools/ChangeLog @@ -1,3 +1,12 @@ +2007-10-01 Werner Koch <[email protected]> + + * gpg-connect-agent.c (do_sendfd): Use INT2FD for assuan_sendfd. + +2007-09-26 Werner Koch <[email protected]> + + * gpg-connect-agent.c (main): Print the first response from the + server. + 2007-09-14 Werner Koch <[email protected]> * gpgconf-comp.c: Make a string translatable. diff --git a/tools/gpg-connect-agent.c b/tools/gpg-connect-agent.c index 5322a4fc5..2300b7f88 100644 --- a/tools/gpg-connect-agent.c +++ b/tools/gpg-connect-agent.c @@ -29,7 +29,7 @@ #include "i18n.h" #include "../common/util.h" #include "../common/asshelp.h" - +#include "../common/sysutils.h" /* Constants to identify the commands and options. */ @@ -244,7 +244,7 @@ do_sendfd (assuan_context_t ctx, char *line) log_error ("file `%s' opened in \"%s\" mode, fd=%d\n", name, mode, fd); - rc = assuan_sendfd (ctx, fd); + rc = assuan_sendfd (ctx, INT2FD (fd) ); if (rc) log_error ("sednig descriptor %d failed: %s\n", fd, gpg_strerror (rc)); fclose (fp); @@ -360,6 +360,16 @@ main (int argc, char **argv) } else ctx = start_agent (); + + /* See whether there is a line pending from the server (in case + assuan did not run the initial handshaking). */ + if (assuan_pending_line (ctx)) + { + rc = read_and_print_response (ctx); + if (rc) + log_info (_("receiving line failed: %s\n"), gpg_strerror (rc) ); + } + line = NULL; linesize = 0; for (;;) |