summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-08-06 13:23:56 +0200
committerThomas Haller <thaller@redhat.com>2015-12-04 12:15:12 +0100
commit7c4b5a44127eb0d1f1669fa49b5e32dbcbb4bd38 (patch)
tree415fee42dfb38a706bb64ade73585143988d06ce
parent7d9f819aa17c514fca7425b55b7d281984d5cbe5 (diff)
downloadNetworkManager-7c4b5a44127eb0d1f1669fa49b5e32dbcbb4bd38.tar.gz
device: let NM_DEVICE_MASTER be equal to nm_device_get_master()
There is only one user of the NM_DEVICE_MASTER property (NMActiveConnection). device_master_changed() uses the property for change notifications, but returns early if !nm_device_get_master(). We might emit the "notify::master" signal too often, even when nothing changed (because currently we always emit it when priv->master changes). If we would fix that to only emit the signal when nm_device_get_master() actually changes, it would still be correct, because device_master_changed() doesn't care about notifications when the master is unset. Hence, the only user doesn't care about the difference. So change it because it's unexpected that the property and function are not completely equal.
-rw-r--r--src/devices/nm-device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 77f3e2031b..54b02534df 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -10130,7 +10130,7 @@ get_property (GObject *object, guint prop_id,
g_value_set_boolean (value, priv->is_master);
break;
case PROP_MASTER:
- g_value_set_object (value, priv->master);
+ g_value_set_object (value, nm_device_get_master (self));
break;
case PROP_HW_ADDRESS:
g_value_set_string (value, priv->hw_addr);