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
06d759ed
Commit
06d759ed
authored
Nov 19, 2011
by
Bruno Jesus
Committed by
Alexandre Julliard
Nov 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Invert SIOCATMARK logic.
parent
8ad904c3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
socket.c
dlls/ws2_32/socket.c
+8
-1
sock.c
dlls/ws2_32/tests/sock.c
+6
-6
No files found.
dlls/ws2_32/socket.c
View file @
06d759ed
...
...
@@ -3133,7 +3133,14 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
||
(
!
oob
&&
ioctl
(
fd
,
SIOCATMARK
,
&
atmark
)
==
-
1
))
status
=
(
errno
==
EBADF
)
?
WSAENOTSOCK
:
wsaErrno
();
else
(
*
(
WS_u_long
*
)
out_buff
)
=
oob
|
atmark
;
{
/* The SIOCATMARK value read from ioctl() is reversed
* because BSD returns TRUE if it's in the OOB mark
* while Windows returns TRUE if there are NO OOB bytes.
*/
(
*
(
WS_u_long
*
)
out_buff
)
=
oob
|
!
atmark
;
}
release_sock_fd
(
s
,
fd
);
break
;
}
...
...
dlls/ws2_32/tests/sock.c
View file @
06d759ed
...
...
@@ -506,7 +506,7 @@ static VOID WINAPI oob_server ( server_params *par )
/* check atmark state */
ioctlsocket
(
mem
->
sock
[
0
].
s
,
SIOCATMARK
,
&
atmark
);
todo_wine
ok
(
atmark
==
1
,
"oob_server (%x): unexpectedly at the OOB mark: %i
\n
"
,
id
,
atmark
);
ok
(
atmark
==
1
,
"oob_server (%x): unexpectedly at the OOB mark: %i
\n
"
,
id
,
atmark
);
/* Receive normal data and check atmark state */
n_recvd
=
do_synchronous_recv
(
mem
->
sock
[
0
].
s
,
mem
->
sock
[
0
].
buf
,
n_expected
,
par
->
buflen
);
...
...
@@ -516,7 +516,7 @@ static VOID WINAPI oob_server ( server_params *par )
ok
(
pos
==
-
1
,
"simple_server (%x): test pattern error: %d
\n
"
,
id
,
pos
);
ioctlsocket
(
mem
->
sock
[
0
].
s
,
SIOCATMARK
,
&
atmark
);
todo_wine
ok
(
atmark
==
1
,
"oob_server (%x): unexpectedly at the OOB mark: %i
\n
"
,
id
,
atmark
);
ok
(
atmark
==
1
,
"oob_server (%x): unexpectedly at the OOB mark: %i
\n
"
,
id
,
atmark
);
/* Receive a part of the out-of-band data and check atmark state */
n_recvd
=
do_synchronous_recv
(
mem
->
sock
[
0
].
s
,
mem
->
sock
[
0
].
buf
,
8
,
par
->
buflen
);
...
...
@@ -525,13 +525,13 @@ static VOID WINAPI oob_server ( server_params *par )
n_expected
-=
8
;
ioctlsocket
(
mem
->
sock
[
0
].
s
,
SIOCATMARK
,
&
atmark
);
ok
(
atmark
==
0
,
"oob_server (%x): not at the OOB mark: %i
\n
"
,
id
,
atmark
);
todo_wine
ok
(
atmark
==
0
,
"oob_server (%x): not at the OOB mark: %i
\n
"
,
id
,
atmark
);
/* Receive the rest of the out-of-band data and check atmark state */
do_synchronous_recv
(
mem
->
sock
[
0
].
s
,
mem
->
sock
[
0
].
buf
,
n_expected
,
par
->
buflen
);
ioctlsocket
(
mem
->
sock
[
0
].
s
,
SIOCATMARK
,
&
atmark
);
ok
(
atmark
==
0
,
"oob_server (%x): not at the OOB mark: %i
\n
"
,
id
,
atmark
);
todo_wine
ok
(
atmark
==
0
,
"oob_server (%x): not at the OOB mark: %i
\n
"
,
id
,
atmark
);
/* cleanup */
wsa_ok
(
closesocket
(
mem
->
sock
[
0
].
s
),
0
==
,
"oob_server (%x): closesocket error: %d
\n
"
);
...
...
@@ -2970,7 +2970,7 @@ static void test_ioctlsocket(void)
ret
=
ioctlsocket
(
sock
,
SIOCATMARK
,
&
arg
);
ok
(
ret
!=
SOCKET_ERROR
,
"ioctlsocket failed unexpectedly
\n
"
);
todo_wine
ok
(
arg
,
"SIOCATMARK expected a non-zero value
\n
"
);
ok
(
arg
,
"SIOCATMARK expected a non-zero value
\n
"
);
/* when SO_OOBINLINE is set SIOCATMARK must always return TRUE */
optval
=
1
;
...
...
@@ -2987,7 +2987,7 @@ static void test_ioctlsocket(void)
ok
(
ret
!=
SOCKET_ERROR
,
"setsockopt failed unexpectedly
\n
"
);
arg
=
0
;
ret
=
ioctlsocket
(
sock
,
SIOCATMARK
,
&
arg
);
todo_wine
ok
(
arg
,
"SIOCATMARK expected a non-zero value
\n
"
);
ok
(
arg
,
"SIOCATMARK expected a non-zero value
\n
"
);
ret
=
WSAIoctl
(
sock
,
SIO_KEEPALIVE_VALS
,
&
arg
,
0
,
NULL
,
0
,
&
arg
,
NULL
,
NULL
);
ok
(
ret
==
SOCKET_ERROR
,
"WSAIoctl succeeded unexpectedly
\n
"
);
...
...
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