summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-05-10 10:32:46 (UTC)
committer mickeyl <mickeyl>2005-05-10 10:32:46 (UTC)
commit9bcf6a5112d31ffdc196ebcd22a584c68f9f7b1e (patch) (unidiff)
treea1f50132c3acea6e593fcdc1484798ed237cb157
parent2272a0d2ae787ad50768910ac1c7be59a073031a (diff)
downloadopie-9bcf6a5112d31ffdc196ebcd22a584c68f9f7b1e.zip
opie-9bcf6a5112d31ffdc196ebcd22a584c68f9f7b1e.tar.gz
opie-9bcf6a5112d31ffdc196ebcd22a584c68f9f7b1e.tar.bz2
ignore hostap control interfaces
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--ChangeLog1
-rw-r--r--noncore/settings/networksettings/mainwindow/mainwindowimp.cpp8
2 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 4115a89..d560127 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,12 +16,13 @@
16 * n.a.- always show volume and wireless applet popups inside visible screen (deller) 16 * n.a.- always show volume and wireless applet popups inside visible screen (deller)
17 * n.a. - scale O-Menu-Applets appropriately (mickeyl) 17 * n.a. - scale O-Menu-Applets appropriately (mickeyl)
18 * n.a.- libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) 18 * n.a.- libopienet: fix bugs in wireless scanning and setting SSID (skyhusker)
19 * n.a.- Wellenreiter: relax WE version matching test a bit (mickeyl) 19 * n.a.- Wellenreiter: relax WE version matching test a bit (mickeyl)
20 * n.a.- scale BluezApplet appropriately and use larger icons (mickeyl) 20 * n.a.- scale BluezApplet appropriately and use larger icons (mickeyl)
21 * n.a.- memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) 21 * n.a.- memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham)
22 * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl)
22 23
23 Internal 24 Internal
24 -------- 25 --------
25 * Make BluezApplet use OTaskbarApplet (mickeyl) 26 * Make BluezApplet use OTaskbarApplet (mickeyl)
26 * Rewrite OFileNotification to use the upcoming inotify interface instead of the deprecated dnotify (mickeyl) 27 * Rewrite OFileNotification to use the upcoming inotify interface instead of the deprecated dnotify (mickeyl)
27 * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) 28 * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl)
diff --git a/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp
index 3222e50..a7b0bdc 100644
--- a/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp
@@ -186,14 +186,14 @@ void MainWindowImp::getAllInterfaces()
186 ifc.ifc_req = ifrs; 186 ifc.ifc_req = ifrs;
187 result = ioctl(sockfd, SIOCGIFCONF, &ifc); 187 result = ioctl(sockfd, SIOCGIFCONF, &ifc);
188 188
189 for (unsigned int i = 0; i < ifc.ifc_len / sizeof(struct ifreq); i++) 189 for (unsigned int i = 0; i < ifc.ifc_len / sizeof(struct ifreq); i++)
190 { 190 {
191 struct ifreq *pifr = &ifrs[i]; 191 struct ifreq *pifr = &ifrs[i];
192 192 if ( !QString( pifr->ifr_name ).startsWith( "wifi" ) ) ifaces += pifr->ifr_name;
193 ifaces += pifr->ifr_name; 193 else odebug << "ignoring hostap control interface " << pifr->ifr_name << oendl;
194 } 194 }
195 } 195 }
196 else 196 else
197 { 197 {
198 procFile.open(IO_ReadOnly); 198 procFile.open(IO_ReadOnly);
199 QString line; 199 QString line;
@@ -203,13 +203,15 @@ void MainWindowImp::getAllInterfaces()
203 procTs.readLine(); // eat a line 203 procTs.readLine(); // eat a line
204 procTs.readLine(); // eat a line 204 procTs.readLine(); // eat a line
205 while((line = procTs.readLine().simplifyWhiteSpace()) != QString::null) 205 while((line = procTs.readLine().simplifyWhiteSpace()) != QString::null)
206 { 206 {
207 if((loc = line.find(":")) != -1) 207 if((loc = line.find(":")) != -1)
208 { 208 {
209 ifaces += line.left(loc); 209 // ignore wifi* (hostap control interfaces)
210 if ( !line.left(loc).startsWith( "wifi" ) ) ifaces += line.left(loc);
211 else odebug << "ignoring hostap control interface " << line.left(loc) << oendl;
210 } 212 }
211 } 213 }
212 } 214 }
213 215
214 for (QStringList::Iterator it = ifaces.begin(); it != ifaces.end(); ++it) 216 for (QStringList::Iterator it = ifaces.begin(); it != ifaces.end(); ++it)
215 { 217 {