[network-manager-applet/lr/import] fixup! editor: add connection argument to the new page function



commit 79957cdd91b721a6f8d7d775f82694e3ad79e8b1
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Mon Nov 7 19:58:50 2016 +0100

    fixup! editor: add connection argument to the new page function

 src/connection-editor/ce-page.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/connection-editor/ce-page.c b/src/connection-editor/ce-page.c
index aca0c72..947e80c 100644
--- a/src/connection-editor/ce-page.c
+++ b/src/connection-editor/ce-page.c
@@ -816,8 +816,7 @@ ce_page_complete_connection (NMConnection *connection,
                              NMClient *client)
 {
        NMSettingConnection *s_con;
-       char *uuid;
-       const char *id;
+       char *id, *uuid;
        const GPtrArray *connections;
 
        s_con = nm_connection_get_setting_connection (connection);
@@ -826,11 +825,11 @@ ce_page_complete_connection (NMConnection *connection,
                nm_connection_add_setting (connection, NM_SETTING (s_con));
        }
 
-       id = nm_setting_connection_get_id (s_con);
-       if (!id) {
+       if (!nm_setting_connection_get_id (s_con)) {
                connections = nm_client_get_connections (client);
                id = ce_page_get_next_available_name (connections, format);
                g_object_set (s_con, NM_SETTING_CONNECTION_ID, id, NULL);
+               g_free (id);
        }
 
        uuid = nm_utils_uuid_generate ();


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