From 2c032d8f1c6292c1338a615e6ec40252889ba85c Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 22 Jan 2015 00:29:39 +0100 Subject: Imported Upstream version 1.0.0 --- src/settings/plugins/example/nm-example-connection.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/settings/plugins/example/nm-example-connection.c') diff --git a/src/settings/plugins/example/nm-example-connection.c b/src/settings/plugins/example/nm-example-connection.c index e2226829..2f0b20a0 100644 --- a/src/settings/plugins/example/nm-example-connection.c +++ b/src/settings/plugins/example/nm-example-connection.c @@ -18,9 +18,11 @@ * Copyright (C) 2012 Red Hat, Inc. */ +#include "config.h" + #include #include -#include +#include #include #include @@ -89,7 +91,7 @@ nm_example_connection_new (const char *full_path, /* Make sure we have a UUID; just a sanity check */ uuid = nm_connection_get_uuid (NM_CONNECTION (object)); if (!uuid) { - g_set_error (error, EXAMPLE_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 (object); object = NULL; @@ -165,12 +167,7 @@ nm_example_connection_init (NMExampleConnection *connection) static void finalize (GObject *object) { - NMExampleConnectionPrivate *priv = NM_EXAMPLE_CONNECTION_GET_PRIVATE (object); - - /* Zero out any secrets so we don't leave them in memory */ - nm_connection_clear_secrets (NM_CONNECTION (object)); - - g_free (priv->path); + g_free (NM_EXAMPLE_CONNECTION_GET_PRIVATE (object)->path); G_OBJECT_CLASS (nm_example_connection_parent_class)->finalize (object); } -- cgit 1.3.0-6-gf8a5