summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-11-22 13:03:00 +0000
committerCorinna Vinschen <corinna@vinschen.de>2010-11-22 13:03:00 +0000
commit9dda712bd90f36d2119b20f5dd63babc1bd4d7a9 (patch)
treea35ab02945fd13f9a5fc73c449ed8732314a4ab0
parent77a5d6ccdf8de9ac7bd8178f290b943d2e396e11 (diff)
downloadcygnal-9dda712bd90f36d2119b20f5dd63babc1bd4d7a9.tar.gz
cygnal-9dda712bd90f36d2119b20f5dd63babc1bd4d7a9.tar.bz2
cygnal-9dda712bd90f36d2119b20f5dd63babc1bd4d7a9.zip
* net.cc (get_ipv4fromreg_ipcnt): Fix debug output. Only create debug
output if error is not ERROR_FILE_NOT_FOUND. (get_ipv4fromreg): Ditto.
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/net.cc6
2 files changed, 10 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 757f9ba37..d4011bdad 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,9 @@
+2010-11-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * net.cc (get_ipv4fromreg_ipcnt): Fix debug output. Only create debug
+ output if error is not ERROR_FILE_NOT_FOUND.
+ (get_ipv4fromreg): Ditto.
+
2010-11-18 Corinna Vinschen <corinna@vinschen.de>
* fhandler_tty.cc (fhandler_tty_slave::fchown): Initialize mode to 0.
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index cefef6741..50118fed1 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -1720,7 +1720,8 @@ get_ipv4fromreg_ipcnt (const char *name)
if ((ret = RegOpenKeyEx (HKEY_LOCAL_MACHINE, regkey, 0, KEY_READ,
&key)) != ERROR_SUCCESS)
{
- debug_printf ("RegOpenKeyEx(%s), win32 error %ld", ret);
+ if (ret != ERROR_FILE_NOT_FOUND)
+ debug_printf ("RegOpenKeyEx(%s), win32 error %ld", regkey, ret);
return 0;
}
/* If DHCP is used, we have only one address. */
@@ -1754,7 +1755,8 @@ get_ipv4fromreg (struct ifall *ifp, const char *name, DWORD idx)
if ((ret = RegOpenKeyEx (HKEY_LOCAL_MACHINE, regkey, 0, KEY_READ, &key))
!= ERROR_SUCCESS)
{
- debug_printf ("RegOpenKeyEx(%s), win32 error %ld", ret);
+ if (ret != ERROR_FILE_NOT_FOUND)
+ debug_printf ("RegOpenKeyEx(%s), win32 error %ld", regkey, ret);
return;
}
/* If DHCP is used, we have only one address. */