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
78ca87a0
Commit
78ca87a0
authored
Sep 16, 2013
by
Bruno Jesus
Committed by
Alexandre Julliard
Sep 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Make WS_EnterSingleProtocol return a boolean.
parent
44ea5334
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
socket.c
dlls/ws2_32/socket.c
+8
-9
No files found.
dlls/ws2_32/socket.c
View file @
78ca87a0
...
...
@@ -1592,15 +1592,14 @@ static INT WS_DuplicateSocket(BOOL unicode, SOCKET s, DWORD dwProcessId, LPWSAPR
* buffer.
*
* RETURNS
* 1 if a protocol was entered into the buffer.
* SOCKET_ERROR otherwise.
* TRUE if a protocol was entered into the buffer.
*
* BUGS
* - only implemented for IPX, SPX, SPXII, TCP, UDP
* - there is no check that the operating system supports the returned
* protocols
*/
static
INT
WS_EnterSingleProtocolW
(
INT
protocol
,
WSAPROTOCOL_INFOW
*
info
)
static
BOOL
WS_EnterSingleProtocolW
(
INT
protocol
,
WSAPROTOCOL_INFOW
*
info
)
{
memset
(
info
,
0
,
sizeof
(
WSAPROTOCOL_INFOW
)
);
info
->
iProtocol
=
protocol
;
...
...
@@ -1694,9 +1693,9 @@ static INT WS_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info )
default:
FIXME
(
"unknown Protocol <0x%08x>
\n
"
,
protocol
);
return
SOCKET_ERROR
;
return
FALSE
;
}
return
1
;
return
TRUE
;
}
/*****************************************************************************
...
...
@@ -1705,14 +1704,14 @@ static INT WS_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info )
* see function WS_EnterSingleProtocolW
*
*/
static
INT
WS_EnterSingleProtocolA
(
INT
protocol
,
WSAPROTOCOL_INFOA
*
info
)
static
BOOL
WS_EnterSingleProtocolA
(
INT
protocol
,
WSAPROTOCOL_INFOA
*
info
)
{
WSAPROTOCOL_INFOW
infow
;
INT
ret
;
memset
(
info
,
0
,
sizeof
(
WSAPROTOCOL_INFOA
)
);
ret
=
WS_EnterSingleProtocolW
(
protocol
,
&
infow
);
if
(
ret
!=
SOCKET_ERROR
)
if
(
ret
)
{
/* convert the structure from W to A */
memcpy
(
info
,
&
infow
,
FIELD_OFFSET
(
WSAPROTOCOL_INFOA
,
szProtocol
)
);
...
...
@@ -1758,12 +1757,12 @@ static INT WS_EnumProtocols( BOOL unicode, const INT *protocols, LPWSAPROTOCOL_I
{
if
(
unicode
)
{
if
(
WS_EnterSingleProtocolW
(
protocols
[
i
],
&
info
.
w
[
items
]
)
!=
SOCKET_ERROR
)
if
(
WS_EnterSingleProtocolW
(
protocols
[
i
],
&
info
.
w
[
items
]
))
items
++
;
}
else
{
if
(
WS_EnterSingleProtocolA
(
protocols
[
i
],
&
info
.
a
[
items
]
)
!=
SOCKET_ERROR
)
if
(
WS_EnterSingleProtocolA
(
protocols
[
i
],
&
info
.
a
[
items
]
))
items
++
;
}
}
...
...
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