settings: clear connection path when unexporting from D-Bus

At that point, the path becomes meaningless. Clear it.
This commit is contained in:
Thomas Haller 2018-03-29 10:57:51 +02:00
parent 24c3eacac6
commit fdbf696f22
2 changed files with 3 additions and 4 deletions

View file

@ -904,8 +904,10 @@ connection_removed (NMSettingsConnection *connection, gpointer user_data)
/* Re-emit for listeners like NMPolicy */
_notify (self, PROP_CONNECTIONS);
if (nm_dbus_object_is_exported (NM_DBUS_OBJECT (connection)))
if (nm_dbus_object_is_exported (NM_DBUS_OBJECT (connection))) {
nm_connection_set_path (NM_CONNECTION (connection), NULL);
nm_dbus_object_unexport (NM_DBUS_OBJECT (connection));
}
check_startup_complete (self);
}

View file

@ -334,9 +334,6 @@ update_connection (SettingsPluginIfcfg *self,
* been removed.
*/
nm_settings_connection_signal_remove (NM_SETTINGS_CONNECTION (connection_by_uuid));
/* Remove the path so that claim_connection() doesn't complain later when
* interface gets managed and connection is re-added. */
nm_connection_set_path (NM_CONNECTION (connection_by_uuid), NULL);
/* signal_remove() will end up removing the connection from our hash,
* so add it back now.