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
96e3e928
Commit
96e3e928
authored
Sep 25, 2002
by
Greg Turner
Committed by
Alexandre Julliard
Sep 25, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Accept time_t argument in WS_setsockopt/WS_SO_RCVTIMEO; translate to
struct timeval for edification of setsockopt.
parent
e9119c19
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
socket.c
dlls/winsock/socket.c
+16
-0
No files found.
dlls/winsock/socket.c
View file @
96e3e928
...
...
@@ -2670,6 +2670,7 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
{
struct
linger
linger
;
int
woptval
;
struct
timeval
tval
;
/* Is a privileged and useless operation, so we don't. */
if
((
optname
==
WS_SO_DEBUG
)
&&
(
level
==
WS_SOL_SOCKET
))
{
...
...
@@ -2704,6 +2705,21 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
optval
=
(
char
*
)
&
woptval
;
optlen
=
sizeof
(
int
);
}
if
(
level
==
SOL_SOCKET
&&
optname
==
SO_RCVTIMEO
&&
optlen
<
sizeof
(
struct
timeval
))
{
if
(
optlen
==
sizeof
(
time_t
))
{
/* Apparently WinSock will accept a shortened struct timeval.
FIXME: should we do the same for SO_SNDTIMEO? */
WARN
(
"Short struct timeval in SO_RCVTIMEO: assuming time_t
\n
"
);
tval
.
tv_sec
=
*
(
time_t
*
)
optval
;
tval
.
tv_usec
=
0
;
optlen
=
sizeof
(
struct
timeval
);
optval
=
(
char
*
)
&
tval
;
}
else
{
WARN
(
"SO_RCVTIMEO for %d bytes is too small: ignored
\n
"
,
optlen
);
close
(
fd
);
return
0
;
}
}
}
if
(
optname
==
SO_RCVBUF
&&
*
(
int
*
)
optval
<
2048
)
{
WARN
(
"SO_RCVBF for %d bytes is too small: ignored
\n
"
,
*
(
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