summary refs log tree commit diff
path: root/src/settings
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2013-02-20 23:06:45 +0100
committerMichael Biebl <biebl@debian.org>2013-02-20 23:06:45 +0100
commit8d275584fc94f398f0a7c990dcd057533d9a5856 (patch)
tree1bf4a928e201222a008e6776799d174ee3223be3 /src/settings
parente17c5736fc3722ce51cb33f3edb203960125a4c1 (diff)
Imported Upstream version 0.9.8.0 upstream/0.9.8.0
Diffstat (limited to 'src/settings')
-rw-r--r--src/settings/nm-settings-connection.c5
-rw-r--r--src/settings/nm-settings.c12
-rw-r--r--src/settings/plugins/keyfile/tests/test-keyfile.c12
3 files changed, 11 insertions, 18 deletions
diff --git a/src/settings/nm-settings-connection.c b/src/settings/nm-settings-connection.c
index f0cfc3fc..d3415862 100644
--- a/src/settings/nm-settings-connection.c
+++ b/src/settings/nm-settings-connection.c
@@ -1734,14 +1734,9 @@ static void
 nm_settings_connection_init (NMSettingsConnection *self)
 {
 	NMSettingsConnectionPrivate *priv = NM_SETTINGS_CONNECTION_GET_PRIVATE (self);
-	static guint32 dbus_counter = 0;
-	char *dbus_path;
 
 	priv->dbus_mgr = nm_dbus_manager_get ();
 
-	dbus_path = g_strdup_printf ("%s/%u", NM_DBUS_PATH_SETTINGS, dbus_counter++);
-	nm_connection_set_path (NM_CONNECTION (self), dbus_path);
-	g_free (dbus_path);
 	priv->visible = FALSE;
 
 	priv->session_monitor = nm_session_monitor_get ();
diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c
index fa474e09..2cfda091 100644
--- a/src/settings/nm-settings.c
+++ b/src/settings/nm-settings.c
@@ -587,7 +587,7 @@ load_plugins (NMSettings *self, const char **plugins, GError **error)
 	gboolean keyfile_added = FALSE;
 	gboolean success = TRUE;
 
-	for (iter = plugins; *iter; iter++) {
+	for (iter = plugins; iter && *iter; iter++) {
 		GModule *plugin;
 		char *full_name, *path;
 		const char *pname = *iter;
@@ -1768,12 +1768,10 @@ nm_settings_new (const char *config_file,
 	priv->dbus_mgr = nm_dbus_manager_get ();
 	priv->bus = nm_dbus_manager_get_connection (priv->dbus_mgr);
 
-	if (plugins) {
-		/* Load the plugins; fail if a plugin is not found. */
-		if (!load_plugins (self, plugins, error)) {
-			g_object_unref (self);
-			return NULL;
-		}
+	/* Load the plugins; fail if a plugin is not found. */
+	if (!load_plugins (self, plugins, error)) {
+		g_object_unref (self);
+		return NULL;
 	}
 
 	unmanaged_specs_changed (NULL, self);
diff --git a/src/settings/plugins/keyfile/tests/test-keyfile.c b/src/settings/plugins/keyfile/tests/test-keyfile.c
index 8a646e1c..f14e5cf7 100644
--- a/src/settings/plugins/keyfile/tests/test-keyfile.c
+++ b/src/settings/plugins/keyfile/tests/test-keyfile.c
@@ -603,7 +603,7 @@ test_write_wired_connection (void)
 	owner_grp = getegid ();
 	success = nm_keyfile_plugin_write_test_connection (connection, TEST_SCRATCH_DIR, owner_uid, owner_grp, &testfile, &error);
 	ASSERT (success == TRUE,
-			"connection-write", "failed to allocate write keyfile: %s",
+			"connection-write", "failed to write keyfile: %s",
 			error ? error->message : "(none)");
 
 	ASSERT (testfile != NULL,
@@ -821,7 +821,7 @@ test_write_ip6_wired_connection (void)
 	owner_grp = getegid ();
 	success = nm_keyfile_plugin_write_test_connection (connection, TEST_SCRATCH_DIR, owner_uid, owner_grp, &testfile, &error);
 	ASSERT (success == TRUE,
-			"connection-write", "failed to allocate write keyfile: %s",
+			"connection-write", "failed to write keyfile: %s",
 			error ? error->message : "(none)");
 
 	ASSERT (testfile != NULL,
@@ -1139,7 +1139,7 @@ test_write_wireless_connection (void)
 	owner_grp = getegid ();
 	success = nm_keyfile_plugin_write_test_connection (connection, TEST_SCRATCH_DIR, owner_uid, owner_grp, &testfile, &error);
 	ASSERT (success == TRUE,
-			"connection-write", "failed to allocate write keyfile: %s",
+			"connection-write", "failed to write keyfile: %s",
 			error ? error->message : "(none)");
 
 	ASSERT (testfile != NULL,
@@ -1269,7 +1269,7 @@ test_write_string_ssid (void)
 	owner_grp = getegid ();
 	success = nm_keyfile_plugin_write_test_connection (connection, TEST_SCRATCH_DIR, owner_uid, owner_grp, &testfile, &error);
 	ASSERT (success == TRUE,
-			"connection-write", "failed to allocate write keyfile: %s",
+			"connection-write", "failed to write keyfile: %s",
 			error ? error->message : "(none)");
 
 	ASSERT (testfile != NULL,
@@ -1916,7 +1916,7 @@ test_write_bt_dun_connection (void)
 	owner_grp = getegid ();
 	success = nm_keyfile_plugin_write_test_connection (connection, TEST_SCRATCH_DIR, owner_uid, owner_grp, &testfile, &error);
 	ASSERT (success == TRUE,
-			"connection-write", "failed to allocate write keyfile: %s",
+			"connection-write", "failed to write keyfile: %s",
 			error ? error->message : "(none)");
 
 	ASSERT (testfile != NULL,
@@ -2162,7 +2162,7 @@ test_write_gsm_connection (void)
 	owner_grp = getegid ();
 	success = nm_keyfile_plugin_write_test_connection (connection, TEST_SCRATCH_DIR, owner_uid, owner_grp, &testfile, &error);
 	ASSERT (success == TRUE,
-			"connection-write", "failed to allocate write keyfile: %s",
+			"connection-write", "failed to write keyfile: %s",
 			error ? error->message : "(none)");
 
 	ASSERT (testfile != NULL,