Signed-off-by: André Hentschel nerv@dawncrow.de --- dlls/iphlpapi/iphlpapi_main.c | 2 +- dlls/iphlpapi/tests/iphlpapi.c | 8 +++++++- include/netioapi.h | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index 604470a..d81fb6a 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -1862,7 +1862,7 @@ DWORD WINAPI GetIfTable2Ex( MIB_IF_TABLE_LEVEL level, MIB_IF_TABLE2 **table )
TRACE( "level %u, table %p\n", level, table );
- if (!table || level > MibIfTableRaw) + if (!table || level > MibIfTableNormalWithoutStatistics) return ERROR_INVALID_PARAMETER;
if (level != MibIfTableNormal) diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c index 3509005..6272a99 100644 --- a/dlls/iphlpapi/tests/iphlpapi.c +++ b/dlls/iphlpapi/tests/iphlpapi.c @@ -2009,7 +2009,13 @@ static void test_GetIfTable2Ex(void) pFreeMibTable( table );
table = NULL; - ret = pGetIfTable2Ex( 2, &table ); + ret = pGetIfTable2Ex( MibIfTableNormalWithoutStatistics, &table ); + ok( ret == NO_ERROR, "got %u\n", ret ); + ok( table != NULL, "table not set\n" ); + pFreeMibTable( table ); + + table = NULL; + ret = pGetIfTable2Ex( 3, &table ); ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret ); ok( !table, "table should not be set\n" ); pFreeMibTable( table ); diff --git a/include/netioapi.h b/include/netioapi.h index 4bd64e8..11cadf6 100644 --- a/include/netioapi.h +++ b/include/netioapi.h @@ -24,7 +24,8 @@ typedef enum _MIB_IF_TABLE_LEVEL { MibIfTableNormal, - MibIfTableRaw + MibIfTableRaw, + MibIfTableNormalWithoutStatistics, } MIB_IF_TABLE_LEVEL, *PMIB_IF_TABLE_LEVEL;
typedef enum _MIB_NOTIFICATION_TYPE
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at https://testbot.winehq.org/JobDetails.pl?Key=37074
Your paranoid android.
=== wvistau64 (32 bit iphlpapi) === iphlpapi.c:2013: Test failed: got 87 iphlpapi.c:2014: Test failed: table not set
=== wvistau64_zh_CN (32 bit iphlpapi) === iphlpapi.c:2013: Test failed: got 87 iphlpapi.c:2014: Test failed: table not set
=== wvistau64_fr (32 bit iphlpapi) === iphlpapi.c:2013: Test failed: got 87 iphlpapi.c:2014: Test failed: table not set
=== wvistau64_he (32 bit iphlpapi) === iphlpapi.c:2013: Test failed: got 87 iphlpapi.c:2014: Test failed: table not set
=== w2008s64 (32 bit iphlpapi) === iphlpapi.c:2013: Test failed: got 87 iphlpapi.c:2014: Test failed: table not set
=== w7u (32 bit iphlpapi) === iphlpapi.c:2013: Test failed: got 87 iphlpapi.c:2014: Test failed: table not set
=== w7pro64 (32 bit iphlpapi) === iphlpapi.c:2013: Test failed: got 87 iphlpapi.c:2014: Test failed: table not set
=== w8 (32 bit iphlpapi) === iphlpapi.c:2013: Test failed: got 87 iphlpapi.c:2014: Test failed: table not set
=== w864 (32 bit iphlpapi) === iphlpapi.c:2013: Test failed: got 87 iphlpapi.c:2014: Test failed: table not set
=== w1064 (32 bit iphlpapi) === iphlpapi.c:2013: Test failed: got 87 iphlpapi.c:2014: Test failed: table not set
=== wvistau64 (64 bit iphlpapi) === iphlpapi.c:2013: Test failed: got 87 iphlpapi.c:2014: Test failed: table not set
=== w2008s64 (64 bit iphlpapi) === iphlpapi.c:2013: Test failed: got 87 iphlpapi.c:2014: Test failed: table not set
=== w7pro64 (64 bit iphlpapi) === iphlpapi.c:2013: Test failed: got 87 iphlpapi.c:2014: Test failed: table not set The previous 2 run(s) terminated abnormally
=== w864 (64 bit iphlpapi) === iphlpapi.c:2013: Test failed: got 87 iphlpapi.c:2014: Test failed: table not set
=== w1064 (64 bit iphlpapi) === iphlpapi.c:2013: Test failed: got 87 iphlpapi.c:2014: Test failed: table not set