[jbossnative-commits] JBoss Native SVN: r1025 - in trunk/sight/native: os/linux and 1 other directory.

jbossnative-commits at lists.jboss.org jbossnative-commits at lists.jboss.org
Thu Sep 13 01:50:50 EDT 2007


Author: mladen.turk at jboss.com
Date: 2007-09-13 01:50:50 -0400 (Thu, 13 Sep 2007)
New Revision: 1025

Modified:
   trunk/sight/native/include/sight_types.h
   trunk/sight/native/os/linux/netadapter.c
Log:
Make OperStatus as UP only if really UP and RUNNING

Modified: trunk/sight/native/include/sight_types.h
===================================================================
--- trunk/sight/native/include/sight_types.h	2007-09-12 18:16:08 UTC (rev 1024)
+++ trunk/sight/native/include/sight_types.h	2007-09-13 05:50:50 UTC (rev 1025)
@@ -218,8 +218,12 @@
 
 #define SIGHT_IFO_UP            1
 #define SIGHT_IFO_DOWN          2
+#define SIGHT_IFO_TESTING       3
+#define SIGHT_IFO_UNKNOWN       4
+#define SIGHT_IFO_DORMANT       5
+#define SIGHT_IFO_NOTPRESENT    6
+#define SIGHT_IFO_LLDOWN        7
 
-
 #ifdef __cplusplus
 }
 #endif

Modified: trunk/sight/native/os/linux/netadapter.c
===================================================================
--- trunk/sight/native/os/linux/netadapter.c	2007-09-12 18:16:08 UTC (rev 1024)
+++ trunk/sight/native/os/linux/netadapter.c	2007-09-13 05:50:50 UTC (rev 1025)
@@ -441,7 +441,10 @@
     }
     /* Set adapter status */
     if (id->flags & IFF_UP) {
-        CALL_METHOD1(0001, thiz, SIGHT_IFO_UP);
+        if (id->flags & IFF_RUNNING)
+            CALL_METHOD1(0001, thiz, SIGHT_IFO_UP);
+        else
+            CALL_METHOD1(0001, thiz, SIGHT_IFO_NOTPRESENT);
     }
     else {
         CALL_METHOD1(0001, thiz, SIGHT_IFO_DOWN);




More information about the jbossnative-commits mailing list