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.
This commit is contained in:
Thomas Haller 2015-08-06 13:23:56 +02:00
parent 7d9f819aa1
commit 7c4b5a4412

View file

@ -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);