From 543d9d7c58c9601dba6f47b3a4011313d1d75499 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Fri, 06 May 2005 09:27:12 +0000 Subject: - 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 --- (limited to 'libopie2/opienet/onetwork.cpp') 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 @@ -104,6 +104,12 @@ void ONetwork::synchronize() s >> str; 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 ) ) { @@ -808,7 +814,7 @@ 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; } } @@ -866,6 +872,7 @@ QString OWirelessNetworkInterface::SSID() const } else { + str[_iwr.u.essid.length] = '\0'; // some drivers don't zero-terminate the string return str; } } -- cgit v0.9.0.2