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
00c97a61
Commit
00c97a61
authored
Nov 15, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Nov 16, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Default to a default gateway when choosing the best route.
parent
5cc527d3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
iphlpapi_main.c
dlls/iphlpapi/iphlpapi_main.c
+6
-3
No files found.
dlls/iphlpapi/iphlpapi_main.c
View file @
00c97a61
...
...
@@ -853,7 +853,7 @@ DWORD WINAPI GetBestRoute(DWORD dwDestAddr, DWORD dwSourceAddr, PMIB_IPFORWARDRO
return
ERROR_INVALID_PARAMETER
;
ret
=
AllocateAndGetIpForwardTableFromStack
(
&
table
,
FALSE
,
GetProcessHeap
(),
0
);
if
(
table
&&
!
ret
)
{
if
(
!
ret
)
{
DWORD
ndx
,
matchedBits
,
matchedNdx
=
table
->
dwNumEntries
;
for
(
ndx
=
0
,
matchedBits
=
0
;
ndx
<
table
->
dwNumEntries
;
ndx
++
)
{
...
...
@@ -869,6 +869,11 @@ DWORD WINAPI GetBestRoute(DWORD dwDestAddr, DWORD dwSourceAddr, PMIB_IPFORWARDRO
matchedBits
=
numShifts
;
matchedNdx
=
ndx
;
}
else
if
(
!
matchedBits
&&
table
->
table
[
ndx
].
dwForwardType
==
MIB_IPROUTE_TYPE_INDIRECT
)
{
/* default to a default gateway */
matchedNdx
=
ndx
;
}
}
}
if
(
matchedNdx
<
table
->
dwNumEntries
)
{
...
...
@@ -881,8 +886,6 @@ DWORD WINAPI GetBestRoute(DWORD dwDestAddr, DWORD dwSourceAddr, PMIB_IPFORWARDRO
}
HeapFree
(
GetProcessHeap
(),
0
,
table
);
}
else
if
(
!
ret
)
ret
=
ERROR_OUTOFMEMORY
;
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
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