[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE_3_2_BRANCH: kdenetwork
From:       Piotr Szymanski <djurban () linuxpl ! org>
Date:       2004-01-30 15:12:59
Message-ID: 20040130151259.72A429911 () office ! kde ! org
[Download RAW message or body]

CVS commit by djurban: 

- backport from head


  M +21 -0     configure.in.in   1.60.2.1
  M +6 -1      wifi/kwireless/linuxwirelesswidget.cpp   1.5.2.1


--- kdenetwork/configure.in.in  #1.60:1.60.2.1
@@ -80,4 +80,25 @@
 fi
 
+AC_MSG_CHECKING([if wireless tools >= 27 are installed])
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_TRY_COMPILE(
+        [
+                #include <iwlib.h>
+        ],
+        [
+                // checking how many arguments does it iw_get_stats want
+                // the result is unimportant
+                struct wireless_info info;
+                char * stupid;
+                iw_get_stats(iw_sockets_open(), stupid, &(info.stats));
+                       
+        ],      AC_MSG_RESULT(no)
+        ,
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_IW_27, 1, [Define if you have iwlib newer than 26])    
+        
+)
+
 # check for SLP
 dnl define the configure option that disables slp

--- kdenetwork/wifi/kwireless/linuxwirelesswidget.cpp  #1.5:1.5.2.1
@@ -13,4 +13,5 @@
 #include <klocale.h>
 #include "linuxwirelesswidget.h"
+#include "config.h"
 
 extern "C" {
@@ -125,5 +126,9 @@ void LinuxWireLessWidget::poll()
 
             // get the device statistics:
+#if HAVE_IW_27 
+            if(iw_get_stats(socketFD, device_c_str, &(info.stats), &(info.range), info.has_range)>= 0)
+#else
             if(iw_get_stats(socketFD, device_c_str, &(info.stats)) >= 0)
+#endif
             {
                 info.has_stats = 1;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic