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
0ddc6d52
Commit
0ddc6d52
authored
Aug 11, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Aug 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Set adapter name in GetAdaptersAddresses.
parent
a664043e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
iphlpapi_main.c
dlls/iphlpapi/iphlpapi_main.c
+8
-1
No files found.
dlls/iphlpapi/iphlpapi_main.c
View file @
0ddc6d52
...
...
@@ -642,12 +642,14 @@ static ULONG adapterAddressesFromIndex(DWORD index, IP_ADAPTER_ADDRESSES *aa, UL
total_size
=
sizeof
(
IP_ADAPTER_ADDRESSES
);
total_size
+=
IF_NAMESIZE
;
total_size
+=
IF_NAMESIZE
*
sizeof
(
WCHAR
);
total_size
+=
sizeof
(
IP_ADAPTER_UNICAST_ADDRESS
)
*
num_addrs
;
total_size
+=
sizeof
(
struct
sockaddr_in
)
*
num_addrs
;
if
(
aa
&&
*
size
>=
total_size
)
{
char
name
[
IF_NAMESIZE
],
*
ptr
=
(
char
*
)
aa
+
sizeof
(
IP_ADAPTER_ADDRESSES
);
char
name
[
IF_NAMESIZE
],
*
ptr
=
(
char
*
)
aa
+
sizeof
(
IP_ADAPTER_ADDRESSES
),
*
src
;
WCHAR
*
dst
;
DWORD
buflen
,
type
,
status
;
memset
(
aa
,
0
,
sizeof
(
IP_ADAPTER_ADDRESSES
));
...
...
@@ -658,6 +660,11 @@ static ULONG adapterAddressesFromIndex(DWORD index, IP_ADAPTER_ADDRESSES *aa, UL
memcpy
(
ptr
,
name
,
IF_NAMESIZE
);
aa
->
AdapterName
=
ptr
;
ptr
+=
IF_NAMESIZE
;
aa
->
FriendlyName
=
(
WCHAR
*
)
ptr
;
for
(
src
=
name
,
dst
=
(
WCHAR
*
)
ptr
;
*
src
;
src
++
,
dst
++
)
*
dst
=
*
src
;
*
dst
++
=
0
;
ptr
=
(
char
*
)
dst
;
if
(
num_addrs
)
{
...
...
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