Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f40cbb3d
Commit
f40cbb3d
authored
Jul 28, 2009
by
Jeff Latimer
Committed by
Alexandre Julliard
Aug 05, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Add the scope_id to the IPv6 address string if present.
parent
4028a0e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
12 deletions
+2
-12
socket.c
dlls/ws2_32/socket.c
+2
-0
sock.c
dlls/ws2_32/tests/sock.c
+0
-12
No files found.
dlls/ws2_32/socket.c
View file @
f40cbb3d
...
...
@@ -4967,6 +4967,8 @@ INT WINAPI WSAAddressToStringA( LPSOCKADDR sockaddr, DWORD len,
WSASetLastError
(
WSAEINVAL
);
return
SOCKET_ERROR
;
}
if
((
sockaddr6
->
sin6_scope_id
))
sprintf
(
buffer
+
strlen
(
buffer
),
"%%%u"
,
sockaddr6
->
sin6_scope_id
);
if
((
sockaddr6
->
sin6_port
))
sprintf
(
buffer
+
strlen
(
buffer
),
"]:%u"
,
ntohs
(
sockaddr6
->
sin6_port
));
break
;
...
...
dlls/ws2_32/tests/sock.c
View file @
f40cbb3d
...
...
@@ -1442,11 +1442,8 @@ static void test_WSAAddressToStringA(void)
ret
=
WSAAddressToStringA
(
(
SOCKADDR
*
)
&
sockaddr6
,
sizeof
(
sockaddr6
),
NULL
,
address6
,
&
len
);
ok
(
!
ret
,
"WSAAddressToStringA() failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
todo_wine
{
ok
(
!
strcmp
(
address6
,
expect6_3_2
),
"Expected: %s, got: %s
\n
"
,
expect6_3_2
,
address6
);
ok
(
len
==
sizeof
(
expect6_3_2
),
"Got size %d
\n
"
,
len
);
}
/* Test IPv6 address and scope_id */
len
=
sizeof
(
address6
);
...
...
@@ -1458,11 +1455,8 @@ static void test_WSAAddressToStringA(void)
ret
=
WSAAddressToStringA
(
(
SOCKADDR
*
)
&
sockaddr6
,
sizeof
(
sockaddr6
),
NULL
,
address6
,
&
len
);
ok
(
!
ret
,
"WSAAddressToStringA() failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
todo_wine
{
ok
(
!
strcmp
(
address6
,
expect6_3_3
),
"Expected: %s, got: %s
\n
"
,
expect6_3_3
,
address6
);
ok
(
len
==
sizeof
(
expect6_3_3
),
"Got size %d
\n
"
,
len
);
}
end:
if
(
v6
!=
INVALID_SOCKET
)
...
...
@@ -1613,11 +1607,8 @@ static void test_WSAAddressToStringW(void)
ret
=
WSAAddressToStringW
(
(
SOCKADDR
*
)
&
sockaddr6
,
sizeof
(
sockaddr6
),
NULL
,
address6
,
&
len
);
ok
(
!
ret
,
"WSAAddressToStringW() failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
todo_wine
{
ok
(
!
lstrcmpW
(
address6
,
expect6_3_2
),
"Wrong string returned
\n
"
);
ok
(
len
==
sizeof
(
expect6_3_2
)
/
sizeof
(
WCHAR
),
"Got %d
\n
"
,
len
);
}
/* Test IPv6 address and scope_id */
len
=
sizeof
(
address6
)
/
sizeof
(
WCHAR
);
...
...
@@ -1629,11 +1620,8 @@ static void test_WSAAddressToStringW(void)
ret
=
WSAAddressToStringW
(
(
SOCKADDR
*
)
&
sockaddr6
,
sizeof
(
sockaddr6
),
NULL
,
address6
,
&
len
);
ok
(
!
ret
,
"WSAAddressToStringW() failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
todo_wine
{
ok
(
!
lstrcmpW
(
address6
,
expect6_3_3
),
"Wrong string returned
\n
"
);
ok
(
len
==
sizeof
(
expect6_3_3
)
/
sizeof
(
WCHAR
),
"Got %d
\n
"
,
len
);
}
end:
if
(
v6
!=
INVALID_SOCKET
)
...
...
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