NetworkManager r3665 - trunk/system-settings/plugins/ifcfg-fedora



Author: dcbw
Date: Tue May 13 17:48:01 2008
New Revision: 3665
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3665&view=rev

Log:
Print something when re-managing an ifcfg connection

Modified:
   trunk/system-settings/plugins/ifcfg-fedora/plugin.c

Modified: trunk/system-settings/plugins/ifcfg-fedora/plugin.c
==============================================================================
--- trunk/system-settings/plugins/ifcfg-fedora/plugin.c	(original)
+++ trunk/system-settings/plugins/ifcfg-fedora/plugin.c	Tue May 13 17:48:01 2008
@@ -312,12 +312,21 @@
 	} 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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]