From: Werner Koch Date: Tue, 30 Jan 2001 12:06:29 +0000 (+0000) Subject: Ugly kludge to avoid blocking in W32's _gpgme_io_write X-Git-Tag: gpgme-1.2.0@1385~1346 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1c40eedf9f0ecbfffa8660be43c54867ee099a59;p=gpgme.git Ugly kludge to avoid blocking in W32's _gpgme_io_write --- diff --git a/trunk/gpgme/w32-io.c b/trunk/gpgme/w32-io.c index c16e441..1e67a64 100644 --- a/trunk/gpgme/w32-io.c +++ b/trunk/gpgme/w32-io.c @@ -287,6 +287,10 @@ _gpgme_io_write ( int fd, const void *buffer, size_t count ) DWORD nwritten; HANDLE h = fd_to_handle (fd); +#warning writing blocks for large counts, so we limit it here. + if (count > 500) + count = 500; + DEBUG2 ("fd %d: about to write %d bytes\n", fd, (int)count ); if ( !WriteFile ( h, buffer, count, &nwritten, NULL) ) { DEBUG1 ("WriteFile failed: ec=%d\n", (int)GetLastError ());