-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
@@ -22,8 +22,9 @@ | |||
22 | Internal | 22 | Internal |
23 | -------- | 23 | -------- |
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 |
28 | 29 | ||
29 | Fixed Bugs | 30 | Fixed Bugs |
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 | |||
@@ -27,10 +27,8 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
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> |
35 | #include <qpe/qpeapplication.h> | 33 | #include <qpe/qpeapplication.h> |
36 | #ifdef OPIE_IMPROVE_GUI_LATENCY | 34 | #ifdef OPIE_IMPROVE_GUI_LATENCY |
@@ -62,11 +60,9 @@ OManufacturerDB* OManufacturerDB::instance() | |||
62 | 60 | ||
63 | 61 | ||
64 | OManufacturerDB::OManufacturerDB() | 62 | OManufacturerDB::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; |
71 | if ( !QFile::exists( filename ) ) | 67 | if ( !QFile::exists( filename ) ) |
72 | { | 68 | { |
@@ -91,11 +87,10 @@ OManufacturerDB::OManufacturerDB() | |||
91 | QTextStream s( &file ); | 87 | QTextStream s( &file ); |
92 | QString addr; | 88 | QString addr; |
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 | { |
100 | s >> addr; | 95 | s >> addr; |
101 | s >> manu; | 96 | s >> manu; |
@@ -103,21 +98,17 @@ OManufacturerDB::OManufacturerDB() | |||
103 | 98 | ||
104 | manufacturers.insert( addr, manu ); | 99 | manufacturers.insert( addr, manu ); |
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 | } |
122 | 113 | ||
123 | 114 | ||
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 | |||
@@ -103,8 +103,14 @@ void ONetwork::synchronize() | |||
103 | { | 103 | { |
104 | s >> str; | 104 | s >> str; |
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 ) ) |
109 | { | 115 | { |
110 | iface = new OWirelessNetworkInterface( this, (const char*) str ); | 116 | iface = new OWirelessNetworkInterface( this, (const char*) str ); |
@@ -807,9 +813,9 @@ QString OWirelessNetworkInterface::nickName() const | |||
807 | return "<unknown>"; | 813 | return "<unknown>"; |
808 | } | 814 | } |
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 | } |
814 | } | 820 | } |
815 | 821 | ||
@@ -865,8 +871,9 @@ QString OWirelessNetworkInterface::SSID() const | |||
865 | return "<unknown>"; | 871 | return "<unknown>"; |
866 | } | 872 | } |
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 | } |
871 | } | 878 | } |
872 | 879 | ||
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 | |||
@@ -17,9 +17,9 @@ SOURCES = odebugmapper.cpp \ | |||
17 | opcap.cpp \ | 17 | opcap.cpp \ |
18 | ostation.cpp | 18 | ostation.cpp |
19 | INTERFACES = | 19 | INTERFACES = |
20 | TARGET = opienet2 | 20 | TARGET = opienet2 |
21 | VERSION = 1.8.5 | 21 | VERSION = 1.8.6 |
22 | INCLUDEPATH += $(OPIEDIR)/include | 22 | INCLUDEPATH += $(OPIEDIR)/include |
23 | DEPENDPATH += $(OPIEDIR)/include | 23 | DEPENDPATH += $(OPIEDIR)/include |
24 | LIBS += -lpcap | 24 | LIBS += -lpcap |
25 | 25 | ||