iphlpapi-TCP_Table: Fix a test failure.

This commit is contained in:
Sebastian Lackner 2017-01-18 17:45:06 +01:00
parent 966293c5d3
commit 105afd2146
2 changed files with 11 additions and 10 deletions

View File

@ -1,17 +1,17 @@
From 9bd0134fa68f09921a9eaabd17fde1f81154c204 Mon Sep 17 00:00:00 2001
From bee86127f9ab33523d66ef7d28b8a44519a8852b Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Sat, 26 Jul 2014 12:31:50 -0600
Subject: iphlpapi: Implement AllocateAndGetTcpExTableFromStack.
Subject: iphlpapi: Implement AllocateAndGetTcpExTableFromStack. (v2)
Based on a patch by Ralf Habacker.
---
dlls/iphlpapi/iphlpapi.spec | 1 +
dlls/iphlpapi/ipstats.c | 35 +++++++++++++++++++++++++++++++++++
dlls/iphlpapi/ipstats.c | 36 ++++++++++++++++++++++++++++++++++++
dlls/iphlpapi/ipstats.h | 1 +
3 files changed, 37 insertions(+)
3 files changed, 38 insertions(+)
diff --git a/dlls/iphlpapi/iphlpapi.spec b/dlls/iphlpapi/iphlpapi.spec
index 228f64f..1fdfbe9 100644
index 4be42fe9971..05d1ada5b07 100644
--- a/dlls/iphlpapi/iphlpapi.spec
+++ b/dlls/iphlpapi/iphlpapi.spec
@@ -5,6 +5,7 @@
@ -23,10 +23,10 @@ index 228f64f..1fdfbe9 100644
@ stdcall AllocateAndGetUdpTableFromStack( ptr long long long )
@ stdcall CancelIPChangeNotify( ptr )
diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c
index 3ff30f3..460f688 100644
index 5965bf9dae6..4284b91bf20 100644
--- a/dlls/iphlpapi/ipstats.c
+++ b/dlls/iphlpapi/ipstats.c
@@ -2327,6 +2327,41 @@ DWORD WINAPI AllocateAndGetTcpTableFromStack( PMIB_TCPTABLE *ppTcpTable, BOOL bO
@@ -2327,6 +2327,42 @@ DWORD WINAPI AllocateAndGetTcpTableFromStack( PMIB_TCPTABLE *ppTcpTable, BOOL bO
return build_tcp_table( TCP_TABLE_BASIC_ALL, (void **)ppTcpTable, bOrder, heap, flags, NULL );
}
@ -55,6 +55,7 @@ index 3ff30f3..460f688 100644
+ ppTcpTable, bOrder, heap, flags, family);
+
+ if (!ppTcpTable) return ERROR_INVALID_PARAMETER;
+ if (!family) return ERROR_INVALID_PARAMETER;
+
+ if (family != WS_AF_INET)
+ {
@ -69,7 +70,7 @@ index 3ff30f3..460f688 100644
{
DWORD table_size;
diff --git a/dlls/iphlpapi/ipstats.h b/dlls/iphlpapi/ipstats.h
index bf5bb92..d8835aa 100644
index bf5bb9269fc..d8835aa3154 100644
--- a/dlls/iphlpapi/ipstats.h
+++ b/dlls/iphlpapi/ipstats.h
@@ -34,6 +34,7 @@ DWORD getInterfaceStatsByName(const char *name, PMIB_IFROW entry) DECLSPEC_HIDDE
@ -81,5 +82,5 @@ index bf5bb92..d8835aa 100644
DWORD WINAPI AllocateAndGetIpForwardTableFromStack(PMIB_IPFORWARDTABLE *ppIpForwardTable, BOOL bOrder, HANDLE heap, DWORD flags) DECLSPEC_HIDDEN;
--
2.2.2
2.11.0

View File

@ -4415,7 +4415,7 @@ fi
if test "$enable_iphlpapi_TCP_Table" -eq 1; then
patch_apply iphlpapi-TCP_Table/0001-iphlpapi-Implement-AllocateAndGetTcpExTableFromStack.patch
(
echo '+ { "Erich E. Hoover", "iphlpapi: Implement AllocateAndGetTcpExTableFromStack.", 1 },';
echo '+ { "Erich E. Hoover", "iphlpapi: Implement AllocateAndGetTcpExTableFromStack.", 2 },';
) >> "$patchlist"
fi