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
6cea48b9
Commit
6cea48b9
authored
Feb 11, 2010
by
Jason Edmeades
Committed by
Alexandre Julliard
Feb 12, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Support indefinite receive timeouts.
parent
70890031
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
socket.c
dlls/ws2_32/socket.c
+1
-1
sock.c
dlls/ws2_32/tests/sock.c
+9
-0
No files found.
dlls/ws2_32/socket.c
View file @
6cea48b9
...
...
@@ -3303,7 +3303,7 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
tval
.
tv_usec
=
(
*
(
const
UINT32
*
)
optval
%
1000
)
*
1000
;
tval
.
tv_sec
=
*
(
const
UINT32
*
)
optval
/
1000
;
/* min of 500 milliseconds */
if
(
tval
.
tv_sec
==
0
&&
tval
.
tv_usec
<
500000
)
if
(
tval
.
tv_sec
==
0
&&
tval
.
tv_usec
&&
tval
.
tv_usec
<
500000
)
tval
.
tv_usec
=
500000
;
optlen
=
sizeof
(
struct
timeval
);
optval
=
(
char
*
)
&
tval
;
...
...
dlls/ws2_32/tests/sock.c
View file @
6cea48b9
...
...
@@ -986,6 +986,15 @@ static void test_set_getsockopt(void)
err
=
getsockopt
(
s
,
SOL_SOCKET
,
SO_RCVTIMEO
,
(
char
*
)
&
timeout
,
&
size
);
ok
(
!
err
,
"get/setsockopt(SO_RCVTIMEO) failed error: %d
\n
"
,
WSAGetLastError
());
ok
(
timeout
==
SOCKTIMEOUT1
,
"getsockopt(SO_RCVTIMEO) returned wrong value %d
\n
"
,
timeout
);
timeout
=
0
;
size
=
sizeof
(
timeout
);
err
=
setsockopt
(
s
,
SOL_SOCKET
,
SO_RCVTIMEO
,
(
char
*
)
&
timeout
,
size
);
if
(
!
err
)
err
=
getsockopt
(
s
,
SOL_SOCKET
,
SO_RCVTIMEO
,
(
char
*
)
&
timeout
,
&
size
);
ok
(
!
err
,
"get/setsockopt(SO_RCVTIMEO) failed error: %d
\n
"
,
WSAGetLastError
());
ok
(
timeout
==
0
,
"getsockopt(SO_RCVTIMEO) returned wrong value %d
\n
"
,
timeout
);
/* SO_SNDTIMEO */
timeout
=
SOCKTIMEOUT2
;
/* 997 seconds. See remark above */
size
=
sizeof
(
timeout
);
...
...
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