aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2001-02-13 12:46:19 +0000
committerWerner Koch <[email protected]>2001-02-13 12:46:19 +0000
commita3b341ff4575a8ba6397ddd8ebc12ed1ba33df52 (patch)
tree21014bc1bea0cc65e24a7154858d25a59b8c0cea
parentMultiple signatures can now be verified. (diff)
downloadgpgme-a3b341ff4575a8ba6397ddd8ebc12ed1ba33df52.tar.gz
gpgme-a3b341ff4575a8ba6397ddd8ebc12ed1ba33df52.zip
Add some debugging code
-rw-r--r--gpgme/ChangeLog6
-rw-r--r--gpgme/posix-io.c6
-rw-r--r--gpgme/rungpg.c2
3 files changed, 12 insertions, 2 deletions
diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog
index ea4ac7eb..076d8178 100644
--- a/gpgme/ChangeLog
+++ b/gpgme/ChangeLog
@@ -1,3 +1,9 @@
+2001-02-13 Werner Koch <[email protected]>
+
+ * 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 <[email protected]>
Enhanced the signature verification, so that it can how handle
diff --git a/gpgme/posix-io.c b/gpgme/posix-io.c
index e46c70b7..4383cc6c 100644
--- a/gpgme/posix-io.c
+++ b/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/gpgme/rungpg.c b/gpgme/rungpg.c
index 36b6f799..c6c6834e 100644
--- a/gpgme/rungpg.c
+++ b/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;