summary refs log tree commit diff
path: root/src/settings/plugins/keyfile/nm-keyfile-connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings/plugins/keyfile/nm-keyfile-connection.c')
-rw-r--r--src/settings/plugins/keyfile/nm-keyfile-connection.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/settings/plugins/keyfile/nm-keyfile-connection.c b/src/settings/plugins/keyfile/nm-keyfile-connection.c
index 4ef761c6..c852f028 100644
--- a/src/settings/plugins/keyfile/nm-keyfile-connection.c
+++ b/src/settings/plugins/keyfile/nm-keyfile-connection.c
@@ -19,9 +19,11 @@
  * Copyright (C) 2008 - 2012 Red Hat, Inc.
  */
 
+#include "config.h"
+
 #include <string.h>
 #include <glib/gstdio.h>
-#include <NetworkManager.h>
+#include <nm-dbus-interface.h>
 #include <nm-setting-connection.h>
 #include <nm-utils.h>
 
@@ -63,7 +65,7 @@ nm_keyfile_connection_new (NMConnection *source,
 
 		uuid = nm_connection_get_uuid (NM_CONNECTION (tmp));
 		if (!uuid) {
-			g_set_error (error, KEYFILE_PLUGIN_ERROR, 0,
+			g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION,
 			             "Connection in file %s had no UUID", full_path);
 			g_object_unref (tmp);
 			return NULL;
@@ -166,11 +168,7 @@ nm_keyfile_connection_init (NMKeyfileConnection *connection)
 static void
 finalize (GObject *object)
 {
-	NMKeyfileConnectionPrivate *priv = NM_KEYFILE_CONNECTION_GET_PRIVATE (object);
-
-	nm_connection_clear_secrets (NM_CONNECTION (object));
-
-	g_free (priv->path);
+	g_free (NM_KEYFILE_CONNECTION_GET_PRIVATE (object)->path);
 
 	G_OBJECT_CLASS (nm_keyfile_connection_parent_class)->finalize (object);
 }
@@ -184,7 +182,7 @@ nm_keyfile_connection_class_init (NMKeyfileConnectionClass *keyfile_connection_c
 	g_type_class_add_private (keyfile_connection_class, sizeof (NMKeyfileConnectionPrivate));
 
 	/* Virtual methods */
-	object_class->finalize     = finalize;
+	object_class->finalize = finalize;
 	settings_class->commit_changes = commit_changes;
 	settings_class->delete = do_delete;
 }