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
bf36fb02
Commit
bf36fb02
authored
Mar 05, 2015
by
Bruno Jesus
Committed by
Alexandre Julliard
Mar 05, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Make closesocket() more robust.
parent
81598be9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
socket.c
dlls/ws2_32/socket.c
+17
-3
No files found.
dlls/ws2_32/socket.c
View file @
bf36fb02
...
...
@@ -2780,9 +2780,23 @@ int WINAPI WS_bind(SOCKET s, const struct WS_sockaddr* name, int namelen)
*/
int
WINAPI
WS_closesocket
(
SOCKET
s
)
{
TRACE
(
"socket %04lx
\n
"
,
s
);
if
(
CloseHandle
(
SOCKET2HANDLE
(
s
)))
return
0
;
return
SOCKET_ERROR
;
int
res
=
SOCKET_ERROR
,
fd
;
if
(
num_startup
)
{
fd
=
get_sock_fd
(
s
,
FILE_READ_DATA
,
NULL
);
if
(
fd
>=
0
)
{
release_sock_fd
(
s
,
fd
);
if
(
CloseHandle
(
SOCKET2HANDLE
(
s
)))
res
=
0
;
}
else
SetLastError
(
WSAENOTSOCK
);
}
else
SetLastError
(
WSANOTINITIALISED
);
TRACE
(
"(socket %04lx) -> %d
\n
"
,
s
,
res
);
return
res
;
}
static
int
do_connect
(
int
fd
,
const
struct
WS_sockaddr
*
name
,
int
namelen
)
...
...
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