Ugly kludge to avoid blocking in W32's _gpgme_io_write
This commit is contained in:
parent
ca34d81b59
commit
83dd53ffe1
@ -287,6 +287,10 @@ _gpgme_io_write ( int fd, const void *buffer, size_t count )
|
|||||||
DWORD nwritten;
|
DWORD nwritten;
|
||||||
HANDLE h = fd_to_handle (fd);
|
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 );
|
DEBUG2 ("fd %d: about to write %d bytes\n", fd, (int)count );
|
||||||
if ( !WriteFile ( h, buffer, count, &nwritten, NULL) ) {
|
if ( !WriteFile ( h, buffer, count, &nwritten, NULL) ) {
|
||||||
DEBUG1 ("WriteFile failed: ec=%d\n", (int)GetLastError ());
|
DEBUG1 ("WriteFile failed: ec=%d\n", (int)GetLastError ());
|
||||||
|
Loading…
Reference in New Issue
Block a user