summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2017-06-18 12:34:53 +0200
committerSlávek Banko <slavek.banko@axis.cz>2017-06-18 12:35:03 +0200
commitf7b0afaffb64259624f7ada53083d688e6e0d424 (patch)
tree3836b052504f6faa51fabcc72a53948a19a6c5b6
parente812d24dd62c10a4fa8fc8cb183a5df500ed963d (diff)
downloadtdenetworkmanager-f7b0afaffb64259624f7ada53083d688e6e0d424.tar.gz
tdenetworkmanager-f7b0afaffb64259624f7ada53083d688e6e0d424.zip
Use interface name instead of MAC address
This relates to API / ABI change in tdelibs This relates to bug 2748 Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 954f1c91e79a3ab7730e205a195083d28c2764f6)
-rw-r--r--tdenetworkmanager/src/devicetraycomponent.cpp6
-rw-r--r--tdenetworkmanager/src/tdenetman-tray.cpp2
-rw-r--r--tdenetworkmanager/src/tdenetman-tray.h2
-rw-r--r--tdenetworkmanager/src/tdenetman-wireless_device_tray.cpp8
4 files changed, 9 insertions, 9 deletions
diff --git a/tdenetworkmanager/src/devicetraycomponent.cpp b/tdenetworkmanager/src/devicetraycomponent.cpp
index 474eaf6..25c43e0 100644
--- a/tdenetworkmanager/src/devicetraycomponent.cpp
+++ b/tdenetworkmanager/src/devicetraycomponent.cpp
@@ -205,7 +205,7 @@ void DeviceTrayComponent::setPixmapForState(TDENetworkConnectionStatus::TDENetwo
m_pixmaps[state] = pixmap;
}
-void DeviceTrayComponent::deviceStateChanged(TDENetworkConnectionStatus::TDENetworkConnectionStatus newState, TDENetworkConnectionStatus::TDENetworkConnectionStatus prevState, TQString hwAddress)
+void DeviceTrayComponent::deviceStateChanged(TDENetworkConnectionStatus::TDENetworkConnectionStatus newState, TDENetworkConnectionStatus::TDENetworkConnectionStatus prevState, TQString deviceNode)
{
lastKnownState = newState;
@@ -213,8 +213,8 @@ void DeviceTrayComponent::deviceStateChanged(TDENetworkConnectionStatus::TDENetw
TDEGlobalNetworkManager* nm = TDEGlobal::networkManager();
TDENetworkDevice* dev = dynamic_cast<TDENetworkDevice*>(hwdevices->findByUniqueID(m_device));
- if (dev->macAddress() != hwAddress) {
- kdDebug() << k_funcinfo << "WARNING: Got networkDeviceStateChanged signal for HW address '" << hwAddress << "', but my HW address is '" << dev->macAddress() << "'! Ignoring...";
+ if (dev->deviceNode() != deviceNode) {
+ kdDebug() << k_funcinfo << "WARNING: Got networkDeviceStateChanged signal for interface '" << deviceNode << "', but my interface is '" << dev->deviceNode() << "'! Ignoring...";
return;
}
diff --git a/tdenetworkmanager/src/tdenetman-tray.cpp b/tdenetworkmanager/src/tdenetman-tray.cpp
index 12a9b63..53a0b73 100644
--- a/tdenetworkmanager/src/tdenetman-tray.cpp
+++ b/tdenetworkmanager/src/tdenetman-tray.cpp
@@ -681,7 +681,7 @@ void Tray::slotUpdateDeviceState()
// FIXME
}
-void Tray::slotUpdateDeviceState(TDENetworkConnectionStatus::TDENetworkConnectionStatus newState, TDENetworkConnectionStatus::TDENetworkConnectionStatus prevState, TQString hwAddress)
+void Tray::slotUpdateDeviceState(TDENetworkConnectionStatus::TDENetworkConnectionStatus newState, TDENetworkConnectionStatus::TDENetworkConnectionStatus prevState, TQString deviceNode)
{
#ifdef DEBUG_STATE
printf("Device state: 0x%08x was: 0x%08x\n", newState, prevState);
diff --git a/tdenetworkmanager/src/tdenetman-tray.h b/tdenetworkmanager/src/tdenetman-tray.h
index da8f1c4..d086902 100644
--- a/tdenetworkmanager/src/tdenetman-tray.h
+++ b/tdenetworkmanager/src/tdenetman-tray.h
@@ -95,7 +95,7 @@ class Tray : public KSystemTray
void slotStateChangedNotify(TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags newState, TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags prevState);
void slotUpdateDeviceState();
- void slotUpdateDeviceState(TDENetworkConnectionStatus::TDENetworkConnectionStatus newState, TDENetworkConnectionStatus::TDENetworkConnectionStatus prevState, TQString hwAddress);
+ void slotUpdateDeviceState(TDENetworkConnectionStatus::TDENetworkConnectionStatus newState, TDENetworkConnectionStatus::TDENetworkConnectionStatus prevState, TQString deviceNode);
void slotNewVPNConnection();
void slotVPNBannerShow(const TQString& vpnbanner);
diff --git a/tdenetworkmanager/src/tdenetman-wireless_device_tray.cpp b/tdenetworkmanager/src/tdenetman-wireless_device_tray.cpp
index a3a4b4c..ce2921c 100644
--- a/tdenetworkmanager/src/tdenetman-wireless_device_tray.cpp
+++ b/tdenetworkmanager/src/tdenetman-wireless_device_tray.cpp
@@ -305,12 +305,12 @@ void WirelessDeviceTray::setPixmapForStates(TDENetworkConnectionStatus::TDENetwo
}
}
-void WirelessDeviceTray::slotUpdateDeviceState(TDENetworkConnectionStatus::TDENetworkConnectionStatus newState, TDENetworkConnectionStatus::TDENetworkConnectionStatus prevState, TQString hwAddress)
+void WirelessDeviceTray::slotUpdateDeviceState(TDENetworkConnectionStatus::TDENetworkConnectionStatus newState, TDENetworkConnectionStatus::TDENetworkConnectionStatus prevState, TQString deviceNode)
{
TDENetworkDevice* dev = dynamic_cast<TDENetworkDevice*>(hwdevices->findByUniqueID(d->dev));
- if (dev->macAddress() != hwAddress) {
- kdDebug() << k_funcinfo << "WARNING: Got networkDeviceStateChanged signal for HW address '" << hwAddress << "', but my HW address is '" << dev->macAddress() << "'! Ignoring...";
+ if (dev->deviceNode() != deviceNode) {
+ kdDebug() << k_funcinfo << "WARNING: Got networkDeviceStateChanged signal for interface '" << deviceNode << "', but my interface is '" << dev->deviceNode() << "'! Ignoring...";
return;
}
@@ -439,7 +439,7 @@ void WirelessDeviceTray::tdeHardwareEventHandler(TDEHardwareEvent::TDEHardwareEv
// force status update to ensure correct icon is shown on startup
if ((dev) && (deviceConnMan)) {
- slotUpdateDeviceState(deviceConnMan->deviceInformation().statusFlags, TDENetworkConnectionStatus::Invalid, dev->macAddress());
+ slotUpdateDeviceState(deviceConnMan->deviceInformation().statusFlags, TDENetworkConnectionStatus::Invalid, dev->deviceNode());
}
}
}