summaryrefslogtreecommitdiff
path: root/libopie2/opienet
Side-by-side diff
Diffstat (limited to 'libopie2/opienet') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/omanufacturerdb.cpp17
-rw-r--r--libopie2/opienet/onetwork.cpp9
-rw-r--r--libopie2/opienet/opienet.pro2
3 files changed, 13 insertions, 15 deletions
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 @@
#include "omanufacturerdb.h"
-#define OPIE_IMPROVE_GUI_LATENCY 1
-
/* OPIE */
#include <opie2/odebug.h>
@@ -64,7 +62,5 @@ OManufacturerDB* OManufacturerDB::instance()
OManufacturerDB::OManufacturerDB()
{
- #ifdef OPIE_IMPROVE_GUI_LATENCY
- Global::statusMessage( "Reading Manufacturers..." );
- #endif
+ if ( qApp ) Global::statusMessage( "Reading Manufacturers..." );
QString filename( "/etc/manufacturers" );
odebug << "OManufacturerDB: trying to read " << filename << oendl;
@@ -93,7 +89,6 @@ OManufacturerDB::OManufacturerDB()
QString manu;
QString extManu;
- #ifdef OPIE_IMPROVE_GUI_LATENCY
int counter = 0;
- #endif
+
while (!s.atEnd())
{
@@ -105,17 +100,13 @@ OManufacturerDB::OManufacturerDB()
manufacturersExt.insert( addr, extManu );
// odebug << "OmanufacturerDB: parse '" << addr << "' as '" << manu << "' (" << extManu << ")" << oendl;
- #ifdef OPIE_IMPROVE_GUI_LATENCY
counter++;
if ( counter == 50 )
{
- qApp->processEvents();
+ if ( qApp ) qApp->processEvents();
counter = 0;
}
- #endif
}
odebug << "OManufacturerDB: manufacturer list completed." << oendl;
- #ifdef OPIE_IMPROVE_GUI_LATENCY
- Global::statusMessage( "Manufacturers Complete..." );
- #endif
+ if ( qApp ) Global::statusMessage( "Manufacturers Complete..." );
}
}
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()
str.truncate( str.find( ':' ) );
odebug << "ONetwork: found interface '" << str << "'" << oendl;
+ if ( str.startsWith( "wifi" ) )
+ {
+ odebug << "ONetwork: ignoring hostap control interface" << oendl;
+ s.readLine();
+ continue;
+ }
ONetworkInterface* iface = 0;
if ( isWirelessInterface( str ) )
@@ -809,5 +815,5 @@ QString OWirelessNetworkInterface::nickName() const
else
{
- str[_iwr.u.data.length] = 0x0; // some drivers (e.g. wlan-ng) don't zero-terminate the string
+ str[_iwr.u.data.length] = '\0'; // some drivers don't zero-terminate the string
return str;
}
@@ -867,4 +873,5 @@ QString OWirelessNetworkInterface::SSID() const
else
{
+ str[_iwr.u.essid.length] = '\0'; // some drivers don't zero-terminate the string
return str;
}
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 \
INTERFACES =
TARGET = opienet2
-VERSION = 1.8.5
+VERSION = 1.8.6
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include