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
edb780e8
Commit
edb780e8
authored
Apr 27, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Use get_rcvsnd_timeo helper in getsockopt.
parent
6a80fe9e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
19 deletions
+3
-19
socket.c
dlls/ws2_32/socket.c
+3
-19
No files found.
dlls/ws2_32/socket.c
View file @
edb780e8
...
...
@@ -3619,16 +3619,10 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
}
return
ret
?
0
:
SOCKET_ERROR
;
}
#ifdef SO_RCVTIMEO
case
WS_SO_RCVTIMEO
:
#endif
#ifdef SO_SNDTIMEO
case
WS_SO_SNDTIMEO
:
#endif
#if defined(SO_RCVTIMEO) || defined(SO_SNDTIMEO)
{
struct
timeval
tv
;
socklen_t
len
=
sizeof
(
struct
timeval
);
INT64
timeout
;
if
(
!
optlen
||
*
optlen
<
sizeof
(
int
)
||
!
optval
)
{
...
...
@@ -3638,22 +3632,12 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
if
(
(
fd
=
get_sock_fd
(
s
,
0
,
NULL
))
==
-
1
)
return
SOCKET_ERROR
;
convert_sockopt
(
&
level
,
&
optname
);
if
(
getsockopt
(
fd
,
level
,
optname
,
&
tv
,
&
len
)
!=
0
)
{
SetLastError
(
wsaErrno
());
ret
=
SOCKET_ERROR
;
}
else
{
*
(
int
*
)
optval
=
tv
.
tv_sec
*
1000
+
tv
.
tv_usec
/
1000
;
*
optlen
=
sizeof
(
int
);
}
timeout
=
get_rcvsnd_timeo
(
fd
,
optname
==
WS_SO_RCVTIMEO
);
*
(
int
*
)
optval
=
timeout
<=
UINT32_MAX
?
timeout
:
UINT32_MAX
;
release_sock_fd
(
s
,
fd
);
return
ret
;
}
#endif
case
WS_SO_TYPE
:
{
if
(
!
optlen
||
*
optlen
<
sizeof
(
int
)
||
!
optval
)
...
...
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