Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b281d3f8
Commit
b281d3f8
authored
Jun 01, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Don't modify last error in async I/O callback.
parent
a1192b03
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
14 deletions
+10
-14
socket.c
dlls/ws2_32/socket.c
+10
-14
No files found.
dlls/ws2_32/socket.c
View file @
b281d3f8
...
...
@@ -1171,7 +1171,7 @@ static int WS2_recv( int fd, struct iovec* iov, int count,
if
(
(
n
=
recvmsg
(
fd
,
&
hdr
,
*
lpFlags
))
==
-
1
)
{
TRACE
(
"recvmsg error %d
\n
"
,
errno
);
goto
out
;
return
-
1
;
}
if
(
lpFrom
&&
...
...
@@ -1180,11 +1180,9 @@ static int WS2_recv( int fd, struct iovec* iov, int count,
/* The from buffer was too small, but we read the data
* anyway. Is that really bad?
*/
WSASetLastError
(
WSAEFAULT
);
WARN
(
"Address buffer too small
\n
"
);
}
out:
TRACE
(
"-> %d
\n
"
,
n
);
return
n
;
}
...
...
@@ -1197,7 +1195,7 @@ out:
static
NTSTATUS
WS2_async_recv
(
void
*
user
,
IO_STATUS_BLOCK
*
iosb
,
NTSTATUS
status
)
{
ws2_async
*
wsa
=
user
;
int
result
=
0
,
fd
,
err
;
int
result
=
0
,
fd
;
TRACE
(
"(%p %p %x)
\n
"
,
wsa
,
iosb
,
status
);
...
...
@@ -1218,8 +1216,7 @@ static NTSTATUS WS2_async_recv( void* user, IO_STATUS_BLOCK* iosb, NTSTATUS stat
}
else
{
err
=
wsaErrno
();
if
(
err
==
WSAEINTR
||
err
==
WSAEWOULDBLOCK
)
/* errno: EINTR / EAGAIN */
if
(
errno
==
EINTR
||
errno
==
EAGAIN
)
{
status
=
STATUS_PENDING
;
_enable_event
(
wsa
->
hSocket
,
FD_READ
,
0
,
0
);
...
...
@@ -1228,8 +1225,8 @@ static NTSTATUS WS2_async_recv( void* user, IO_STATUS_BLOCK* iosb, NTSTATUS stat
else
{
result
=
0
;
status
=
err
;
/* FIXME: is this correct ???? */
TRACE
(
"Error: %x
\n
"
,
err
);
status
=
wsaErrno
()
;
/* FIXME: is this correct ???? */
TRACE
(
"Error: %x
\n
"
,
status
);
}
}
break
;
...
...
@@ -1260,8 +1257,8 @@ static int WS2_send( int fd, struct iovec* iov, int count,
hdr
.
msg_namelen
=
ws_sockaddr_ws2u
(
to
,
tolen
,
&
unix_addr
);
if
(
!
hdr
.
msg_namelen
)
{
WSASetLastError
(
WSAEFAULT
)
;
return
SOCKET_ERROR
;
errno
=
EFAULT
;
return
-
1
;
}
#ifdef HAVE_IPX
...
...
@@ -1334,8 +1331,7 @@ static NTSTATUS WS2_async_send(void* user, IO_STATUS_BLOCK* iosb, NTSTATUS statu
}
else
{
int
err
=
wsaErrno
();
if
(
err
==
WSAEINTR
)
if
(
errno
==
EINTR
||
errno
==
EAGAIN
)
{
status
=
STATUS_PENDING
;
_enable_event
(
wsa
->
hSocket
,
FD_WRITE
,
0
,
0
);
...
...
@@ -1345,9 +1341,9 @@ static NTSTATUS WS2_async_send(void* user, IO_STATUS_BLOCK* iosb, NTSTATUS statu
{
/* We set the status to a winsock error code and check for that
later in NtStatusToWSAError () */
status
=
err
;
status
=
wsaErrno
()
;
result
=
0
;
TRACE
(
"Error: %x
\n
"
,
err
);
TRACE
(
"Error: %x
\n
"
,
status
);
}
}
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment