[Guessnet-devel] [svn] r112 - trunk/src

Enrico Zini guessnet-devel@lists.alioth.debian.org
Mon, 02 May 2005 12:09:03 +0000


Author: enrico
Date: Mon May  2 12:09:02 2005
New Revision: 112

Modified:
   trunk/src/IFace.cc
Log:
If testing for mii fail, report that the link beat IS present
Removed past errors that caused the wlan and priv tests not to be considered


Modified: trunk/src/IFace.cc
==============================================================================
--- trunk/src/IFace.cc	(original)
+++ trunk/src/IFace.cc	Mon May  2 12:09:02 2005
@@ -288,15 +288,17 @@
 	}
 
 	try {
-		/* interface_status_t status = */ interface_detect_beat_wlan(fd, iface);
+		interface_status_t status = interface_detect_beat_wlan(fd, iface);
 		cached_detect_beat_func = interface_detect_beat_wlan;
+		return status;
 	} catch (MIIException& e) {
 		warning("Link beat detection (wlan) failed: %.*s\n", PFSTR(e.desc()));
 	}
 
 	try {
-		/* interface_status_t status = */ interface_detect_beat_priv(fd, iface);
+		interface_status_t status = interface_detect_beat_priv(fd, iface);
 		cached_detect_beat_func = interface_detect_beat_priv;
+		return status;
 	} catch (MIIException& e) {
 		warning("Link beat detection (priv) failed: %.*s\n", PFSTR(e.desc()));
 	}
@@ -424,7 +426,7 @@
 	
 			if (status == IFSTATUS_ERR)
 			{
-				_has_mii = false;
+				_has_mii = true;
 			} else {
 				_conn = status == IFSTATUS_UP;
 			}