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
6c824e8b
Commit
6c824e8b
authored
Oct 18, 2007
by
Aric Stewart
Committed by
Alexandre Julliard
Oct 19, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Return proper WSAENOBUFS error when enuming protocols.
parent
4565b4f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
protocol.c
dlls/ws2_32/protocol.c
+4
-8
No files found.
dlls/ws2_32/protocol.c
View file @
6c824e8b
...
...
@@ -301,18 +301,16 @@ INT WINAPI WSAEnumProtocolsA( LPINT protocols, LPWSAPROTOCOL_INFOA buffer, LPDWO
DWORD
size
=
0
;
INT
local
[]
=
{
WS_IPPROTO_TCP
,
WS_IPPROTO_UDP
,
NSPROTO_IPX
,
NSPROTO_SPX
,
NSPROTO_SPXII
,
0
};
if
(
!
buffer
)
return
SOCKET_ERROR
;
if
(
!
protocols
)
protocols
=
local
;
while
(
protocols
[
i
])
i
++
;
size
=
i
*
sizeof
(
WSAPROTOCOL_INFOA
);
if
(
*
len
<
size
)
if
(
*
len
<
size
||
!
buffer
)
{
*
len
=
size
;
WSASetLastError
(
WSAENOBUFS
);
return
SOCKET_ERROR
;
}
...
...
@@ -367,18 +365,16 @@ INT WINAPI WSAEnumProtocolsW( LPINT protocols, LPWSAPROTOCOL_INFOW buffer, LPDWO
DWORD
size
=
0
;
INT
local
[]
=
{
WS_IPPROTO_TCP
,
WS_IPPROTO_UDP
,
NSPROTO_IPX
,
NSPROTO_SPX
,
NSPROTO_SPXII
,
0
};
if
(
!
buffer
)
return
SOCKET_ERROR
;
if
(
!
protocols
)
protocols
=
local
;
while
(
protocols
[
i
])
i
++
;
size
=
i
*
sizeof
(
WSAPROTOCOL_INFOW
);
if
(
*
len
<
size
)
if
(
*
len
<
size
||
!
buffer
)
{
*
len
=
size
;
WSASetLastError
(
WSAENOBUFS
);
return
SOCKET_ERROR
;
}
...
...
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