mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 16:20:09 +01:00
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:
parent
7d9f819aa1
commit
7c4b5a4412
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue