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
8e29fcdd
Commit
8e29fcdd
authored
Sep 17, 2013
by
Bruno Jesus
Committed by
Alexandre Julliard
Sep 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Use the struct information when the parameters are zero in WSASocket.
parent
bffc240b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
socket.c
dlls/ws2_32/socket.c
+7
-7
sock.c
dlls/ws2_32/tests/sock.c
+1
-2
No files found.
dlls/ws2_32/socket.c
View file @
8e29fcdd
...
...
@@ -5884,20 +5884,20 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
return
ret
;
}
/* convert the socket family and type */
af
=
convert_af_w2u
(
af
);
type
=
convert_socktype_w2u
(
type
);
if
(
lpProtocolInfo
)
{
if
(
af
==
FROM_PROTOCOL_INFO
)
if
(
af
==
FROM_PROTOCOL_INFO
||
!
af
)
af
=
lpProtocolInfo
->
iAddressFamily
;
if
(
type
==
FROM_PROTOCOL_INFO
)
if
(
type
==
FROM_PROTOCOL_INFO
||
!
type
)
type
=
lpProtocolInfo
->
iSocketType
;
if
(
protocol
==
FROM_PROTOCOL_INFO
)
if
(
protocol
==
FROM_PROTOCOL_INFO
||
!
protocol
)
protocol
=
lpProtocolInfo
->
iProtocol
;
}
/* convert the socket family and type */
af
=
convert_af_w2u
(
af
);
type
=
convert_socktype_w2u
(
type
);
if
(
af
==
AF_UNSPEC
)
/* did they not specify the address family? */
{
if
((
protocol
==
IPPROTO_TCP
&&
type
==
SOCK_STREAM
)
||
...
...
dlls/ws2_32/tests/sock.c
View file @
8e29fcdd
...
...
@@ -1946,7 +1946,6 @@ todo_wine
pi
[
0
].
iSocketType
=
SOCK_DGRAM
;
pi
[
0
].
iAddressFamily
=
AF_INET
;
sock
=
WSASocketA
(
0
,
0
,
0
,
&
pi
[
0
],
0
,
0
);
todo_wine
{
ok
(
sock
!=
INVALID_SOCKET
,
"Failed to create socket: %d
\n
"
,
WSAGetLastError
());
size
=
sizeof
(
socktype
);
...
...
@@ -1956,7 +1955,7 @@ todo_wine {
ok
(
socktype
==
SOCK_DGRAM
,
"Wrong socket type, expected %d received %d
\n
"
,
SOCK_DGRAM
,
socktype
);
closesocket
(
sock
);
}
sock
=
WSASocketA
(
AF_INET
,
SOCK_STREAM
,
IPPROTO_TCP
,
&
pi
[
0
],
0
,
0
);
ok
(
sock
!=
INVALID_SOCKET
,
"Failed to create socket: %d
\n
"
,
WSAGetLastError
());
...
...
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