From c15d432d3d6b7cbdf4e15c36bf3377fe95318b01 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 13 Feb 2001 12:46:19 +0000 Subject: [PATCH] Add some debugging code --- trunk/gpgme/ChangeLog | 6 ++++++ trunk/gpgme/posix-io.c | 6 +++++- trunk/gpgme/rungpg.c | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index ea4ac7e..076d817 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,3 +1,9 @@ +2001-02-13 Werner Koch + + * posix-io.c (_gpgme_io_read): Add some debug output. + (_gpgme_io_write): Ditto. + (_gpgme_io_select): Increased the timeout. + 2001-02-12 Werner Koch Enhanced the signature verification, so that it can how handle diff --git a/trunk/gpgme/posix-io.c b/trunk/gpgme/posix-io.c index e46c70b..4383cc6 100644 --- a/trunk/gpgme/posix-io.c +++ b/trunk/gpgme/posix-io.c @@ -41,9 +41,11 @@ _gpgme_io_read ( int fd, void *buffer, size_t count ) { int nread; + DEBUG2 ("fd %d: about to read %d bytes\n", fd, (int)count ); do { nread = read (fd, buffer, count); } while (nread == -1 && errno == EINTR ); + DEBUG2 ("fd %d: got %d bytes\n", fd, nread ); return nread; } @@ -53,9 +55,11 @@ _gpgme_io_write ( int fd, const void *buffer, size_t count ) { int nwritten; + DEBUG2 ("fd %d: about to write %d bytes\n", fd, (int)count ); do { nwritten = write (fd, buffer, count); } while (nwritten == -1 && errno == EINTR ); + DEBUG2 ("fd %d: wrote %d bytes\n", fd, (int)nwritten ); return nwritten; } @@ -215,7 +219,7 @@ _gpgme_io_select ( struct io_select_fd_s *fds, size_t nfds ) static fd_set readfds; static fd_set writefds; int any, i, max_fd, n, count; - struct timeval timeout = { 0, 50 }; /* Use a 50ms timeout */ + struct timeval timeout = { 0, 200 }; /* Use a 200ms timeout */ void *dbg_help; FD_ZERO ( &readfds ); diff --git a/trunk/gpgme/rungpg.c b/trunk/gpgme/rungpg.c index 36b6f79..c6c6834 100644 --- a/trunk/gpgme/rungpg.c +++ b/trunk/gpgme/rungpg.c @@ -979,7 +979,7 @@ read_status ( GpgObject gpg ) if ( *p == '\n' ) { /* (we require that the last line is terminated by a LF) */ *p = 0; - /*fprintf (stderr, "read_status: `%s'\n", buffer);*/ + /* fprintf (stderr, "read_status: `%s'\n", buffer); */ if (!strncmp (buffer, "[GNUPG:] ", 9 ) && buffer[9] >= 'A' && buffer[9] <= 'Z' ) { struct status_table_s t, *r; -- 2.26.2