GNOME Bugzilla – Bug 712188
[review] dcbw/default-wired-unsaved: convert NMDefaultWiredConnection into a normal NMSettingsConnection
Last modified: 2013-11-13 17:53:26 UTC
Because the NMDefaultWiredConnection was an in-memory only connection and never backed by a settings plugin connection, when the default wired connection was modified and saved, it required re-adding the connection to a settings plugin and removing the default wired connection object. That triggered a device disconnect if a device was using that connection, since connection removal requires a device disconnect. Now that we have unsaved connections, just use that functionality and make the default wired connection a normal NMSettingsConnection. When it is deleted without having been modified, put the MAC address into no-auto-default like before.
* stray space after signals[DBUS_UPDATED] = * nm_setttings_device_added() nm_log_info (LOGD_SETTINGS, "Added default wired connection '%s' for %s", + nm_connection_get_id (NM_CONNECTION (added)), + nm_device_get_udi (device)); } Do you want to print UDI instead of interface name? Other than that it looks good. I will test shortly.
just nitpicks: >+ nm_log_info (LOGD_SETTINGS, "Saved default wired connection '%s' to persistent storage", >+ nm_connection_get_id (NM_CONNECTION (connection))); >+ nm_log_warn (LOGD_SETTINGS, "(%s) Couldn't save new default wired connection: %s", >+ nm_device_get_iface (device), In both of these cases, "save" is not the right word is it? (In default_wired_dbus_updated(), the connection has been modified, but may still be unsaved. In nm_settings_device_added(), the connection is not being "saved" but merely "added".)
Created attachment 259738 [details] [review] [PATCH] disconnect the signals for DefaultWiredConnection
(In reply to comment #3) > Created an attachment (id=259738) [details] [review] > [PATCH] disconnect the signals for DefaultWiredConnection Notable change: this will also call nm_config_set_ethernet_no_auto_default for the DBUS_CHANGED signal... I think this is more correct.
I took thaller's patch except for always setting no-auto-default; I retained the previous behavior of only setting no-auto-default when the connection is explicitly deleted.
Merged to master.