mirror of
git://git.gnupg.org/gnupg.git
synced 2025-06-19 20:37:57 +02:00
* http.c (write_server) [__MINGW32__]: Replaced WriteFile by send
because sockets don't work with WriteFile under NT anymore.
This commit is contained in:
parent
f67a0e6223
commit
d89cf26621
@ -1,3 +1,8 @@
|
|||||||
|
2002-05-04 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* http.c (write_server) [__MINGW32__]: Replaced WriteFile by send
|
||||||
|
because sockets don't work with WriteFile under NT anymore.
|
||||||
|
|
||||||
2002-05-03 David Shaw <dshaw@jabberwocky.com>
|
2002-05-03 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* argparse.c (optfile_parse): Remove quotes only if they totally
|
* argparse.c (optfile_parse): Remove quotes only if they totally
|
||||||
|
@ -786,11 +786,11 @@ write_server( int sock, const char *data, size_t length )
|
|||||||
nleft = length;
|
nleft = length;
|
||||||
while( nleft > 0 ) {
|
while( nleft > 0 ) {
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
unsigned long nwritten;
|
int nwritten;
|
||||||
HANDLE sock_fd = (HANDLE)sock;
|
|
||||||
|
|
||||||
if ( !WriteFile ( sock_fd, data, nleft, &nwritten, NULL)) {
|
nwritten = send (sock, data, nleft, 0);
|
||||||
log_info ("write failed: ec=%d\n", (int)GetLastError ());
|
if ( nwritten == SOCKET_ERROR ) {
|
||||||
|
log_info ("write failed: ec=%d\n", (int)WSAGetLastError ());
|
||||||
return G10ERR_NETWORK;
|
return G10ERR_NETWORK;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user