aboutsummaryrefslogtreecommitdiffstats
path: root/src/assuan-io.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2007-07-12 10:06:26 +0000
committerWerner Koch <[email protected]>2007-07-12 10:06:26 +0000
commit35fedf1acdf8aabea7a897dad06672cce10b6a3d (patch)
tree899f9afec6ecbd4eb8fb20b8669448730cac2b7c /src/assuan-io.c
parent2007-07-08 Marcus Brinkmann <[email protected]> (diff)
downloadlibassuan-35fedf1acdf8aabea7a897dad06672cce10b6a3d.tar.gz
libassuan-35fedf1acdf8aabea7a897dad06672cce10b6a3d.zip
Introduced new type for better support of W32 HADNLES vs. file descriptors.
Diffstat (limited to 'src/assuan-io.c')
-rw-r--r--src/assuan-io.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/assuan-io.c b/src/assuan-io.c
index c0d33ee..7ce43cb 100644
--- a/src/assuan-io.c
+++ b/src/assuan-io.c
@@ -55,12 +55,12 @@ _assuan_simple_read (assuan_context_t ctx, void *buffer, size_t size)
read if recv detects that it is not a network socket. */
int n;
- n = recv (ctx->inbound.fd, buffer, size, 0);
+ n = recv (HANDLE2SOCKET(ctx->inbound.fd), buffer, size, 0);
if (n == -1 && WSAGetLastError () == WSAENOTSOCK)
{
DWORD nread = 0;
- n = ReadFile ((HANDLE)ctx->inbound.fd, buffer, size, &nread, NULL);
+ n = ReadFile (ctx->inbound.fd, buffer, size, &nread, NULL);
if (!n)
{
errno = EIO; /* FIXME: We should have a proper mapping. */
@@ -84,12 +84,12 @@ _assuan_simple_write (assuan_context_t ctx, const void *buffer, size_t size)
write if send detects that it is not a network socket. */
int n;
- n = send (ctx->outbound.fd, buffer, size, 0);
+ n = send (HANDLE2SOCKET(ctx->outbound.fd), buffer, size, 0);
if (n == -1 && WSAGetLastError () == WSAENOTSOCK)
{
DWORD nwrite;
- n = WriteFile ((HANDLE)ctx->outbound.fd, buffer, size, &nwrite, NULL);
+ n = WriteFile (ctx->outbound.fd, buffer, size, &nwrite, NULL);
if (!n)
{
errno = EIO; /* FIXME: We should have a proper mapping. */