summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-05-06 09:27:12 (UTC)
committer mickeyl <mickeyl>2005-05-06 09:27:12 (UTC)
commit543d9d7c58c9601dba6f47b3a4011313d1d75499 (patch) (unidiff)
tree6b9d259a91b220264c961d542e25b69fe070320f
parentc199fa0b0ef971c3a121af6c31a9a9822561a1be (diff)
downloadopie-543d9d7c58c9601dba6f47b3a4011313d1d75499.zip
opie-543d9d7c58c9601dba6f47b3a4011313d1d75499.tar.gz
opie-543d9d7c58c9601dba6f47b3a4011313d1d75499.tar.bz2
- OManufacturerDB: check if there is a QApplication before calling Global::statusMessage or qApp->processEvents()
- ONetwork: skip hostap control interfaces 'wifi*' - OWirelessNetworkInterface: set \0 in SSID() and nickName() to work around (buggy) drivers not returning a zero-terminated string
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog1
-rw-r--r--libopie2/opienet/omanufacturerdb.cpp17
-rw-r--r--libopie2/opienet/onetwork.cpp9
-rw-r--r--libopie2/opienet/opienet.pro2
4 files changed, 14 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 63ed0c3..511c841 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,4 +24,5 @@
24 * Make BluezApplet use OTaskbarApplet (mickeyl) 24 * Make BluezApplet use OTaskbarApplet (mickeyl)
25 * Rewrite OFileNotification to use the upcoming inotify interface instead of the deprecated dnotify (mickeyl) 25 * Rewrite OFileNotification to use the upcoming inotify interface instead of the deprecated dnotify (mickeyl)
26 * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl)
26 27
27 2005-03-25Opie 1.2.0 28 2005-03-25Opie 1.2.0
diff --git a/libopie2/opienet/omanufacturerdb.cpp b/libopie2/opienet/omanufacturerdb.cpp
index 123aee8..3af3d4c 100644
--- a/libopie2/opienet/omanufacturerdb.cpp
+++ b/libopie2/opienet/omanufacturerdb.cpp
@@ -29,6 +29,4 @@
29#include "omanufacturerdb.h" 29#include "omanufacturerdb.h"
30 30
31#define OPIE_IMPROVE_GUI_LATENCY 1
32
33/* OPIE */ 31/* OPIE */
34#include <opie2/odebug.h> 32#include <opie2/odebug.h>
@@ -64,7 +62,5 @@ OManufacturerDB* OManufacturerDB::instance()
64OManufacturerDB::OManufacturerDB() 62OManufacturerDB::OManufacturerDB()
65{ 63{
66 #ifdef OPIE_IMPROVE_GUI_LATENCY 64 if ( qApp ) Global::statusMessage( "Reading Manufacturers..." );
67 Global::statusMessage( "Reading Manufacturers..." );
68 #endif
69 QString filename( "/etc/manufacturers" ); 65 QString filename( "/etc/manufacturers" );
70 odebug << "OManufacturerDB: trying to read " << filename << oendl; 66 odebug << "OManufacturerDB: trying to read " << filename << oendl;
@@ -93,7 +89,6 @@ OManufacturerDB::OManufacturerDB()
93 QString manu; 89 QString manu;
94 QString extManu; 90 QString extManu;
95 #ifdef OPIE_IMPROVE_GUI_LATENCY
96 int counter = 0; 91 int counter = 0;
97 #endif 92
98 while (!s.atEnd()) 93 while (!s.atEnd())
99 { 94 {
@@ -105,17 +100,13 @@ OManufacturerDB::OManufacturerDB()
105 manufacturersExt.insert( addr, extManu ); 100 manufacturersExt.insert( addr, extManu );
106 // odebug << "OmanufacturerDB: parse '" << addr << "' as '" << manu << "' (" << extManu << ")" << oendl; 101 // odebug << "OmanufacturerDB: parse '" << addr << "' as '" << manu << "' (" << extManu << ")" << oendl;
107 #ifdef OPIE_IMPROVE_GUI_LATENCY
108 counter++; 102 counter++;
109 if ( counter == 50 ) 103 if ( counter == 50 )
110 { 104 {
111 qApp->processEvents(); 105 if ( qApp ) qApp->processEvents();
112 counter = 0; 106 counter = 0;
113 } 107 }
114 #endif
115 } 108 }
116 odebug << "OManufacturerDB: manufacturer list completed." << oendl; 109 odebug << "OManufacturerDB: manufacturer list completed." << oendl;
117 #ifdef OPIE_IMPROVE_GUI_LATENCY 110 if ( qApp ) Global::statusMessage( "Manufacturers Complete..." );
118 Global::statusMessage( "Manufacturers Complete..." );
119 #endif
120 } 111 }
121} 112}
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp
index 0a74019..f4bdbe0 100644
--- a/libopie2/opienet/onetwork.cpp
+++ b/libopie2/opienet/onetwork.cpp
@@ -105,4 +105,10 @@ void ONetwork::synchronize()
105 str.truncate( str.find( ':' ) ); 105 str.truncate( str.find( ':' ) );
106 odebug << "ONetwork: found interface '" << str << "'" << oendl; 106 odebug << "ONetwork: found interface '" << str << "'" << oendl;
107 if ( str.startsWith( "wifi" ) )
108 {
109 odebug << "ONetwork: ignoring hostap control interface" << oendl;
110 s.readLine();
111 continue;
112 }
107 ONetworkInterface* iface = 0; 113 ONetworkInterface* iface = 0;
108 if ( isWirelessInterface( str ) ) 114 if ( isWirelessInterface( str ) )
@@ -809,5 +815,5 @@ QString OWirelessNetworkInterface::nickName() const
809 else 815 else
810 { 816 {
811 str[_iwr.u.data.length] = 0x0; // some drivers (e.g. wlan-ng) don't zero-terminate the string 817 str[_iwr.u.data.length] = '\0'; // some drivers don't zero-terminate the string
812 return str; 818 return str;
813 } 819 }
@@ -867,4 +873,5 @@ QString OWirelessNetworkInterface::SSID() const
867 else 873 else
868 { 874 {
875 str[_iwr.u.essid.length] = '\0'; // some drivers don't zero-terminate the string
869 return str; 876 return str;
870 } 877 }
diff --git a/libopie2/opienet/opienet.pro b/libopie2/opienet/opienet.pro
index a10a949..460de0a 100644
--- a/libopie2/opienet/opienet.pro
+++ b/libopie2/opienet/opienet.pro
@@ -19,5 +19,5 @@ SOURCES = odebugmapper.cpp \
19INTERFACES = 19INTERFACES =
20TARGET = opienet2 20TARGET = opienet2
21VERSION = 1.8.5 21VERSION = 1.8.6
22INCLUDEPATH += $(OPIEDIR)/include 22INCLUDEPATH += $(OPIEDIR)/include
23DEPENDPATH += $(OPIEDIR)/include 23DEPENDPATH += $(OPIEDIR)/include