-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | libopie2/opienet/omanufacturerdb.cpp | 17 | ||||
-rw-r--r-- | libopie2/opienet/onetwork.cpp | 9 | ||||
-rw-r--r-- | libopie2/opienet/opienet.pro | 2 |
4 files changed, 14 insertions, 15 deletions
@@ -25,2 +25,3 @@ * Rewrite OFileNotification to use the upcoming inotify interface instead of the deprecated dnotify (mickeyl) + * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) 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 @@ -30,4 +30,2 @@ -#define OPIE_IMPROVE_GUI_LATENCY 1 - /* OPIE */ @@ -65,5 +63,3 @@ OManufacturerDB::OManufacturerDB() { - #ifdef OPIE_IMPROVE_GUI_LATENCY - Global::statusMessage( "Reading Manufacturers..." ); - #endif + if ( qApp ) Global::statusMessage( "Reading Manufacturers..." ); QString filename( "/etc/manufacturers" ); @@ -94,5 +90,4 @@ OManufacturerDB::OManufacturerDB() QString extManu; - #ifdef OPIE_IMPROVE_GUI_LATENCY int counter = 0; - #endif + while (!s.atEnd()) @@ -106,3 +101,2 @@ OManufacturerDB::OManufacturerDB() // odebug << "OmanufacturerDB: parse '" << addr << "' as '" << manu << "' (" << extManu << ")" << oendl; - #ifdef OPIE_IMPROVE_GUI_LATENCY counter++; @@ -110,11 +104,8 @@ OManufacturerDB::OManufacturerDB() { - 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 @@ -106,2 +106,8 @@ void ONetwork::synchronize() odebug << "ONetwork: found interface '" << str << "'" << oendl; + if ( str.startsWith( "wifi" ) ) + { + odebug << "ONetwork: ignoring hostap control interface" << oendl; + s.readLine(); + continue; + } ONetworkInterface* iface = 0; @@ -810,3 +816,3 @@ QString OWirelessNetworkInterface::nickName() const { - 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; @@ -868,2 +874,3 @@ QString OWirelessNetworkInterface::SSID() const { + 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 @@ -20,3 +20,3 @@ INTERFACES = TARGET = opienet2 -VERSION = 1.8.5 +VERSION = 1.8.6 INCLUDEPATH += $(OPIEDIR)/include |