* net.cc (get_95_ifconf): Using other registry values pointing to

correct networkdevice identification for Windows95.
This commit is contained in:
Corinna Vinschen 2001-10-10 19:28:19 +00:00
parent a0d03b7eaf
commit f6a85cddc8
2 changed files with 31 additions and 49 deletions

View File

@ -1,3 +1,8 @@
Wed Oct 10 16:10:41 2001 Alexander Gottwald <ago@informatik.tu-chemnitz.de>
* net.cc (get_95_ifconf): Using other registry values pointing to
correct networkdevice identification for Windows95.
Tue Oct 9 22:22:45 2001 Christopher Faylor <cgf@cygnus.com> Tue Oct 9 22:22:45 2001 Christopher Faylor <cgf@cygnus.com>
Throughout, rename PROC_FORK1 to PROC_FORK. Throughout, rename PROC_FORK1 to PROC_FORK.

View File

@ -1921,7 +1921,7 @@ get_95_ifconf (struct ifconf *ifc, int what)
++i) ++i)
{ {
HKEY ifkey, subkey; HKEY ifkey, subkey;
char driver[256], classname[256], bindname[256], netname[256]; char driver[256], classname[256], netname[256];
char adapter[256], ip[256], np[256]; char adapter[256], ip[256], np[256];
if (res != ERROR_SUCCESS if (res != ERROR_SUCCESS
@ -1997,28 +1997,8 @@ get_95_ifconf (struct ifconf *ifc, int what)
RegCloseKey (subkey); RegCloseKey (subkey);
if (RegOpenKeyEx (ifkey, "Bindings",
0, KEY_READ, &subkey) != ERROR_SUCCESS)
{
RegCloseKey (ifkey);
--ifr;
continue;
}
for (int j = 0;
(res = RegEnumValue (subkey, j, bindname,
(size = sizeof bindname, &size),
0, NULL, NULL, NULL)) != ERROR_NO_MORE_ITEMS;
++j)
if (!strncasecmp (bindname, "VREDIR\\", 7))
break;
RegCloseKey (subkey);
if (res == ERROR_SUCCESS)
{
strcpy (netname, "System\\CurrentControlSet\\Services\\Class\\Net\\"); strcpy (netname, "System\\CurrentControlSet\\Services\\Class\\Net\\");
strcat (netname, bindname + 7); strcat (netname, ifname);
if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, netname, if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, netname,
0, KEY_READ, &subkey) != ERROR_SUCCESS) 0, KEY_READ, &subkey) != ERROR_SUCCESS)
@ -2045,9 +2025,6 @@ get_95_ifconf (struct ifconf *ifc, int what)
} }
RegCloseKey (subkey); RegCloseKey (subkey);
}
RegCloseKey (ifkey); RegCloseKey (ifkey);
++cnt; ++cnt;