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
f9c82654
Commit
f9c82654
authored
Nov 05, 2005
by
Saulius Krasuckas
Committed by
Alexandre Julliard
Nov 05, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Stricten cases for NT in a two tests.
- WSAAddressToString[AW] don't fail on Win9x for those. - Modify it to pass new tests.
parent
056d9693
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
socket.c
dlls/winsock/socket.c
+2
-1
sock.c
dlls/winsock/tests/sock.c
+10
-4
No files found.
dlls/winsock/socket.c
View file @
f9c82654
...
...
@@ -3966,7 +3966,7 @@ INT WINAPI WSAAddressToStringA( LPSOCKADDR sockaddr, DWORD len,
CHAR
buffer
[
22
];
/* 12 digits + 3 dots + ':' + 5 digits + '\0' */
CHAR
*
p
;
TRACE
(
"(%p, %l
x
, %p, %p, %p)
\n
"
,
sockaddr
,
len
,
info
,
string
,
lenstr
);
TRACE
(
"(%p, %l
d
, %p, %p, %p)
\n
"
,
sockaddr
,
len
,
info
,
string
,
lenstr
);
if
(
!
sockaddr
||
len
<
sizeof
(
SOCKADDR_IN
))
return
SOCKET_ERROR
;
if
(
!
string
||
!
lenstr
)
return
SOCKET_ERROR
;
...
...
@@ -3989,6 +3989,7 @@ INT WINAPI WSAAddressToStringA( LPSOCKADDR sockaddr, DWORD len,
if
(
*
lenstr
<
size
)
{
*
lenstr
=
size
;
WSASetLastError
(
WSAEFAULT
);
return
SOCKET_ERROR
;
}
...
...
dlls/winsock/tests/sock.c
View file @
f9c82654
...
...
@@ -1044,6 +1044,7 @@ static void test_WSAAddressToStringA(void)
{
INT
ret
;
DWORD
len
;
int
GLE
;
SOCKADDR_IN
sockaddr
;
CHAR
address
[
22
];
/* 12 digits + 3 dots + ':' + 5 digits + '\0' */
...
...
@@ -1059,8 +1060,10 @@ static void test_WSAAddressToStringA(void)
sockaddr
.
sin_addr
.
s_addr
=
0
;
ret
=
WSAAddressToStringA
(
(
SOCKADDR
*
)
&
sockaddr
,
sizeof
(
sockaddr
),
NULL
,
address
,
&
len
);
ok
(
ret
==
SOCKET_ERROR
,
"WSAAddressToStringA() succeeded! WSAGetLastError()=%x, ret=%d
\n
"
,
WSAGetLastError
(),
ret
);
GLE
=
WSAGetLastError
();
ok
(
(
ret
==
SOCKET_ERROR
&&
GLE
==
WSAEFAULT
)
||
(
ret
==
0
),
"WSAAddressToStringA() failed unexpectedly: WSAGetLastError()=%d, ret=%d
\n
"
,
GLE
,
ret
);
len
=
sizeof
(
address
);
...
...
@@ -1111,6 +1114,7 @@ static void test_WSAAddressToStringW(void)
{
INT
ret
;
DWORD
len
;
int
GLE
;
SOCKADDR_IN
sockaddr
;
WCHAR
address
[
22
];
/* 12 digits + 3 dots + ':' + 5 digits + '\0' */
...
...
@@ -1127,8 +1131,10 @@ static void test_WSAAddressToStringW(void)
sockaddr
.
sin_addr
.
s_addr
=
0
;
ret
=
WSAAddressToStringW
(
(
SOCKADDR
*
)
&
sockaddr
,
sizeof
(
sockaddr
),
NULL
,
address
,
&
len
);
ok
(
ret
==
SOCKET_ERROR
,
"WSAAddressToStringW() succeeded! WSAGetLastError()=%x, ret=%d
\n
"
,
WSAGetLastError
(),
ret
);
GLE
=
WSAGetLastError
();
ok
(
(
ret
==
SOCKET_ERROR
&&
GLE
==
WSAEFAULT
)
||
(
ret
==
0
),
"WSAAddressToStringW() failed unexpectedly: WSAGetLastError()=%d, ret=%d
\n
"
,
GLE
,
ret
);
len
=
sizeof
(
address
);
...
...
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