Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
aba59471
Commit
aba59471
authored
Apr 17, 2002
by
Martin Wilck
Committed by
Alexandre Julliard
Apr 17, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
_get_sock_fd_type: New function, retrieve fd type and flags like
FILE_GetUnixHandleType(). WSASendTo/WSARecvFrom: Use _get_sock_fd_type().
parent
e0587d4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
socket.c
dlls/winsock/socket.c
+13
-4
No files found.
dlls/winsock/socket.c
View file @
aba59471
...
...
@@ -245,6 +245,13 @@ inline static int _get_sock_fd(SOCKET s)
return
fd
;
}
inline
static
int
_get_sock_fd_type
(
SOCKET
s
,
enum
fd_type
*
type
,
int
*
flags
)
{
int
fd
;
if
(
set_error
(
wine_server_handle_to_fd
(
s
,
GENERIC_READ
,
&
fd
,
type
,
flags
)
))
return
-
1
;
return
fd
;
}
static
void
_enable_event
(
SOCKET
s
,
unsigned
int
event
,
unsigned
int
sstate
,
unsigned
int
cstate
)
{
...
...
@@ -1975,15 +1982,16 @@ INT WINAPI WSASendTo( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
LPWSAOVERLAPPED
lpOverlapped
,
LPWSAOVERLAPPED_COMPLETION_ROUTINE
lpCompletionRoutine
)
{
int
i
,
n
,
fd
,
err
=
WSAENOTSOCK
;
int
i
,
n
,
fd
,
err
=
WSAENOTSOCK
,
flags
;
struct
iovec
*
iovec
;
struct
msghdr
msghdr
;
enum
fd_type
type
;
TRACE
(
"socket %04x, wsabuf %p, nbufs %ld, flags %ld, to %p, tolen %d, ovl %p, func %p
\n
"
,
s
,
lpBuffers
,
dwBufferCount
,
dwFlags
,
to
,
tolen
,
lpOverlapped
,
lpCompletionRoutine
);
fd
=
_get_sock_fd
(
s
);
fd
=
_get_sock_fd
_type
(
s
,
&
type
,
&
flags
);
if
(
fd
==
-
1
)
goto
error
;
...
...
@@ -3268,14 +3276,15 @@ INT WINAPI WSARecvFrom( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
struct
iovec
*
iovec
;
struct
msghdr
msghdr
;
int
fd
,
i
,
length
,
err
=
WSAENOTSOCK
;
int
fd
,
i
,
length
,
err
=
WSAENOTSOCK
,
flags
;
enum
fd_type
type
;
TRACE
(
"socket %04x, wsabuf %p, nbufs %ld, flags %ld, from %p, fromlen %ld, ovl %p, func %p
\n
"
,
s
,
lpBuffers
,
dwBufferCount
,
*
lpFlags
,
lpFrom
,
(
lpFromlen
?
*
lpFromlen
:
-
1L
),
lpOverlapped
,
lpCompletionRoutine
);
fd
=
_get_sock_fd
(
s
);
fd
=
_get_sock_fd
_type
(
s
,
&
type
,
&
flags
);
if
(
fd
==
-
1
)
{
...
...
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