Add some debugging code

This commit is contained in:
Werner Koch 2001-02-13 12:46:19 +00:00
parent 06dae7fcf3
commit a3b341ff45
3 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2001-02-13 Werner Koch <wk@gnupg.org>
* 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 <wk@gnupg.org>
Enhanced the signature verification, so that it can how handle

View File

@ -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 );

View File

@ -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;