inetmib1: Fix remaining failure on Win9x/NT4.

This commit is contained in:
Juan Lang 2008-10-08 15:24:12 -07:00 committed by Alexandre Julliard
parent 52e64b155e
commit 1627377d1b
1 changed files with 9 additions and 7 deletions

View File

@ -66,7 +66,7 @@ static void testQuery(void)
UINT mib2IpAddr[] = { 1,3,6,1,2,1,4,20,1,1 }; UINT mib2IpAddr[] = { 1,3,6,1,2,1,4,20,1,1 };
UINT mib2IpRouteTable[] = { 1,3,6,1,2,1,4,21,1,1 }; UINT mib2IpRouteTable[] = { 1,3,6,1,2,1,4,21,1,1 };
UINT mib2UdpTable[] = { 1,3,6,1,2,1,7,5,1,1 }; UINT mib2UdpTable[] = { 1,3,6,1,2,1,7,5,1,1 };
SnmpVarBind vars[3], vars2[3]; SnmpVarBind vars[3], vars2[3], vars3[3];
UINT entry; UINT entry;
pQuery = (void *)GetProcAddress(inetmib1, "SnmpExtensionQuery"); pQuery = (void *)GetProcAddress(inetmib1, "SnmpExtensionQuery");
@ -247,8 +247,8 @@ static void testQuery(void)
SnmpUtilVarBindFree(&vars2[2]); SnmpUtilVarBindFree(&vars2[2]);
/* Even though SnmpExtensionInit says this DLL supports the MIB2 system /* Even though SnmpExtensionInit says this DLL supports the MIB2 system
* variables, the first variable it returns a value for is the first * variables, on recent systems (at least Win2k) the first variable it
* interface. * returns a value for is the first interface.
*/ */
vars[0].name.idLength = sizeof(mib2System) / sizeof(mib2System[0]); vars[0].name.idLength = sizeof(mib2System) / sizeof(mib2System[0]);
vars[0].name.ids = mib2System; vars[0].name.ids = mib2System;
@ -263,10 +263,12 @@ static void testQuery(void)
ok(error == SNMP_ERRORSTATUS_NOERROR, ok(error == SNMP_ERRORSTATUS_NOERROR,
"expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error); "expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error);
ok(index == 0, "expected index 0, got %d\n", index); ok(index == 0, "expected index 0, got %d\n", index);
vars[0].name.idLength = sizeof(mib2If) / sizeof(mib2If[0]); vars3[0].name.idLength = sizeof(mib2If) / sizeof(mib2If[0]);
vars[0].name.ids = mib2If; vars3[0].name.ids = mib2If;
ok(!SnmpUtilOidNCmp(&vars2[0].name, &vars[0].name, vars[0].name.idLength), ok(!SnmpUtilOidNCmp(&vars2[0].name, &vars[0].name, vars[0].name.idLength) ||
"expected 1.3.6.1.2.1.2, got %s\n", SnmpUtilOidToA(&vars2[0].name)); !SnmpUtilOidNCmp(&vars2[0].name, &vars3[0].name, vars3[0].name.idLength),
"expected 1.3.6.1.2.1.1 or 1.3.6.1.2.1.2, got %s\n",
SnmpUtilOidToA(&vars2[0].name));
SnmpUtilVarBindFree(&vars2[0]); SnmpUtilVarBindFree(&vars2[0]);
/* Check the type and OIDs of the IP address table */ /* Check the type and OIDs of the IP address table */