From 8f5ad894339944409022b028f4c2df17103e7591 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 5 Sep 2012 11:50:02 -0500 Subject: Ensure that an inactive access point is reported as such --- tdecore/networkbackends/network-manager/network-manager.cpp | 3 +++ tdecore/tdenetworkconnections.cpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/tdecore/networkbackends/network-manager/network-manager.cpp b/tdecore/networkbackends/network-manager/network-manager.cpp index 5cf5f7534..2671ac57b 100644 --- a/tdecore/networkbackends/network-manager/network-manager.cpp +++ b/tdecore/networkbackends/network-manager/network-manager.cpp @@ -1342,6 +1342,9 @@ TDENetworkDeviceInformation TDENetworkConnectionManager_BackendNM::deviceInforma ret.wiFiInfo.activeAccessPointBSSID = apInfo->BSSID; delete apInfo; } + else { + ret.wiFiInfo.activeAccessPointBSSID = TDEMACAddress(); + } ret.wiFiInfo.wirelessFlags = tdeWiFiFlagsToNMWiFiFlags(d->m_wiFiDeviceProxy->getWirelessCapabilities(error)); } else { diff --git a/tdecore/tdenetworkconnections.cpp b/tdecore/tdenetworkconnections.cpp index cc4c4b94d..39899b131 100644 --- a/tdecore/tdenetworkconnections.cpp +++ b/tdecore/tdenetworkconnections.cpp @@ -657,6 +657,10 @@ TDENetworkDevice* TDENetworkConnectionManager::findDeviceByUUID(TQString uuid) { } TDENetworkWiFiAPInfo* TDENetworkConnectionManager::findAccessPointByBSSID(TDEMACAddress bssid) { + if (!bssid.isValid()) { + return NULL; + } + TDENetworkHWNeighbor *neighbor; for (neighbor = m_hwNeighborList->first(); neighbor; neighbor = m_hwNeighborList->next()) { TDENetworkWiFiAPInfo* apInfo = dynamic_cast(neighbor); -- cgit v1.2.1