From e868d1cef6faf466568005b59a1bbe43448f4388 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 13 May 2008 17:48:01 +0000 Subject: [PATCH] Print something when re-managing an ifcfg connection git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3665 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- system-settings/plugins/ifcfg-fedora/plugin.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/system-settings/plugins/ifcfg-fedora/plugin.c b/system-settings/plugins/ifcfg-fedora/plugin.c index af2c43407f..2aee98e991 100644 --- a/system-settings/plugins/ifcfg-fedora/plugin.c +++ b/system-settings/plugins/ifcfg-fedora/plugin.c @@ -312,12 +312,21 @@ connection_changed_handler (SCPluginIfcfg *plugin, } else { NMConnection *old_wrapped, *new_wrapped; - if (old_unmanaged) /* no longer unmanaged */ - g_signal_emit_by_name (plugin, "connection-added", connection); - new_wrapped = nm_exported_connection_get_connection (NM_EXPORTED_CONNECTION (tmp)); old_wrapped = nm_exported_connection_get_connection (NM_EXPORTED_CONNECTION (connection)); + if (old_unmanaged) { /* no longer unmanaged */ + NMSettingConnection *s_con; + + s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (new_wrapped, NM_TYPE_SETTING_CONNECTION)); + g_assert (s_con); + g_assert (s_con->id); + + PLUGIN_PRINT (IFCFG_PLUGIN_NAME, "Managing connection '%s' and its " + "device because NM_CONTROLLED was true.", s_con->id); + g_signal_emit_by_name (plugin, "connection-added", connection); + } + /* Only update if different */ if (!nm_connection_compare (new_wrapped, old_wrapped, COMPARE_FLAGS_EXACT)) { settings = nm_connection_to_hash (new_wrapped);