summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2017-06-18 10:34:53 (GMT)
committer Slávek Banko <slavek.banko@axis.cz>2017-06-18 10:34:53 (GMT)
commit954f1c91e79a3ab7730e205a195083d28c2764f6 (patch)
tree0d5daad5dfa543d39bb7e3d5cc15c41161849bd0
parented438e09ab62e320a0f5eed38f8a453403c54ecb (diff)
downloadtdenetworkmanager-954f1c91.zip
tdenetworkmanager-954f1c91.tar.gz
Use interface name instead of MAC addressHEADorigin/masterorigin/HEADmaster
This relates to API / ABI change in tdelibs This relates to bug 2748 Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-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());
}
}
}