aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2001-01-30 12:06:29 +0000
committerWerner Koch <[email protected]>2001-01-30 12:06:29 +0000
commit83dd53ffe186129b29ebcb4293c42226fc9710f4 (patch)
tree932ba22e3b7a0d8b2efe242d5583f1145bd5e435
parentW32 fix (diff)
downloadgpgme-83dd53ffe186129b29ebcb4293c42226fc9710f4.tar.gz
gpgme-83dd53ffe186129b29ebcb4293c42226fc9710f4.zip
Ugly kludge to avoid blocking in W32's _gpgme_io_write
Diffstat (limited to '')
-rw-r--r--gpgme/w32-io.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gpgme/w32-io.c b/gpgme/w32-io.c
index c16e4415..1e67a642 100644
--- a/gpgme/w32-io.c
+++ b/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 ());