[network-manager-applet/lr/import] x



commit 65e37119da417f89e2e3bed81e009169c11a4890
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Tue Oct 25 14:52:45 2016 +0200

    x

 src/connection-editor/ce-page.c            |    2 ++
 src/connection-editor/connection-helpers.c |   16 +++++++++++++++-
 2 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/src/connection-editor/ce-page.c b/src/connection-editor/ce-page.c
index a1a0d36..1ceaceb 100644
--- a/src/connection-editor/ce-page.c
+++ b/src/connection-editor/ce-page.c
@@ -819,6 +819,8 @@ ce_page_complete_connection (NMConnection *connection,
        char *uuid, *id;
        const GPtrArray *connections;
 
+g_printerr ("COMPLETE\n");
+
        s_con = nm_connection_get_setting_connection (connection);
        if (!s_con) {
                s_con = NM_SETTING_CONNECTION (nm_setting_connection_new ());
diff --git a/src/connection-editor/connection-helpers.c b/src/connection-editor/connection-helpers.c
index c6570e1..b4c0adc 100644
--- a/src/connection-editor/connection-helpers.c
+++ b/src/connection-editor/connection-helpers.c
@@ -185,7 +185,6 @@ vpn_import_from_file (const char *filename, NMClient *client)
 {
        NMConnection *connection = NULL;
        const char *service_type;
-       NMSettingConnection *s_con;
        NMSettingVpn *s_vpn;
        GError *error = NULL;
        GSList *iter;
@@ -202,6 +201,21 @@ vpn_import_from_file (const char *filename, NMClient *client)
        }
 
        if (connection) {
+
+//XXX
+{
+NMSettingConnection *s_con;
+
+s_con = nm_connection_get_setting_connection (connection);
+if (!s_con) {
+       s_con = NM_SETTING_CONNECTION (nm_setting_connection_new ());
+       nm_connection_add_setting (connection, NM_SETTING (s_con));
+}
+g_object_set (s_con, NM_SETTING_CONNECTION_TYPE, "vpn");
+}
+
+
+
                /* Sanity check the connection. */
                s_vpn = nm_connection_get_setting_vpn (connection);
                service_type = s_vpn ? nm_setting_vpn_get_service_type (s_vpn) : NULL;


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