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
9c4a1289
Commit
9c4a1289
authored
Jul 11, 2007
by
Mark Adams
Committed by
Alexandre Julliard
Jul 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Fix byte ordering of Linux ports.
parent
2569635c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
iphlpapi_main.c
dlls/iphlpapi/iphlpapi_main.c
+6
-4
ipstats.c
dlls/iphlpapi/ipstats.c
+2
-2
No files found.
dlls/iphlpapi/iphlpapi_main.c
View file @
9c4a1289
...
@@ -296,13 +296,15 @@ static int TcpTableSorter(const void *a, const void *b)
...
@@ -296,13 +296,15 @@ static int TcpTableSorter(const void *a, const void *b)
const
MIB_TCPROW
*
rowA
=
a
;
const
MIB_TCPROW
*
rowA
=
a
;
const
MIB_TCPROW
*
rowB
=
b
;
const
MIB_TCPROW
*
rowB
=
b
;
ret
=
rowA
->
dwLocalAddr
-
rowB
->
dwLocalAddr
;
ret
=
ntohl
(
rowA
->
dwLocalAddr
)
-
ntohl
(
rowB
->
dwLocalAddr
)
;
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
ret
=
rowA
->
dwLocalPort
-
rowB
->
dwLocalPort
;
ret
=
ntohs
((
unsigned
short
)
rowA
->
dwLocalPort
)
-
ntohs
((
unsigned
short
)
rowB
->
dwLocalPort
);
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
ret
=
rowA
->
dwRemoteAddr
-
rowB
->
dwRemoteAddr
;
ret
=
ntohl
(
rowA
->
dwRemoteAddr
)
-
ntohl
(
rowB
->
dwRemoteAddr
)
;
if
(
ret
==
0
)
if
(
ret
==
0
)
ret
=
rowA
->
dwRemotePort
-
rowB
->
dwRemotePort
;
ret
=
ntohs
((
unsigned
short
)
rowA
->
dwRemotePort
)
-
ntohs
((
unsigned
short
)
rowB
->
dwRemotePort
);
}
}
}
}
}
}
...
...
dlls/iphlpapi/ipstats.c
View file @
9c4a1289
...
@@ -1316,7 +1316,7 @@ DWORD getTcpTable(PMIB_TCPTABLE *ppTcpTable, DWORD maxEntries, HANDLE heap,
...
@@ -1316,7 +1316,7 @@ DWORD getTcpTable(PMIB_TCPTABLE *ppTcpTable, DWORD maxEntries, HANDLE heap,
if
(
ptr
&&
*
ptr
)
{
if
(
ptr
&&
*
ptr
)
{
ptr
++
;
ptr
++
;
table
->
table
[
table
->
dwNumEntries
].
dwLocalPort
=
table
->
table
[
table
->
dwNumEntries
].
dwLocalPort
=
strtoul
(
ptr
,
&
endPtr
,
16
);
htons
((
unsigned
short
)
strtoul
(
ptr
,
&
endPtr
,
16
)
);
ptr
=
endPtr
;
ptr
=
endPtr
;
}
}
if
(
ptr
&&
*
ptr
)
{
if
(
ptr
&&
*
ptr
)
{
...
@@ -1327,7 +1327,7 @@ DWORD getTcpTable(PMIB_TCPTABLE *ppTcpTable, DWORD maxEntries, HANDLE heap,
...
@@ -1327,7 +1327,7 @@ DWORD getTcpTable(PMIB_TCPTABLE *ppTcpTable, DWORD maxEntries, HANDLE heap,
if
(
ptr
&&
*
ptr
)
{
if
(
ptr
&&
*
ptr
)
{
ptr
++
;
ptr
++
;
table
->
table
[
table
->
dwNumEntries
].
dwRemotePort
=
table
->
table
[
table
->
dwNumEntries
].
dwRemotePort
=
strtoul
(
ptr
,
&
endPtr
,
16
);
htons
((
unsigned
short
)
strtoul
(
ptr
,
&
endPtr
,
16
)
);
ptr
=
endPtr
;
ptr
=
endPtr
;
}
}
if
(
ptr
&&
*
ptr
)
{
if
(
ptr
&&
*
ptr
)
{
...
...
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