[network-manager-pptp] properties: don't announce import/export capabilities



commit de5098676dc675bc56c5690b3c05dc8e2e09f9f0
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Wed Dec 23 12:51:56 2015 +0100

    properties: don't announce import/export capabilities
    
    We don't implement it and don't do error reporting correctly.
    
    There doesn't seem to be a standard way to import/export PPTP connections.
    Windows uses PBK files which contain multiple connections and some properties
    such as remote, but not PPP parameters or cretentials. That's not very
    practical. PPP settings are stored in separate CMS files:
    
    https://bugzilla.gnome.org/show_bug.cgi?id=641254
    
    We could also import/export PPP configurations. It wouldn't help
    interoperability a lot more than if we could just export libnm keyfiles instead.

 properties/import-export.c |   11 ++++++++---
 properties/nm-pptp.c       |    2 +-
 2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/properties/import-export.c b/properties/import-export.c
index 5ef040c..c8dcd3d 100644
--- a/properties/import-export.c
+++ b/properties/import-export.c
@@ -43,14 +43,19 @@
 NMConnection *
 do_import (const char *path, char **lines, GError **error)
 {
+       g_set_error_literal (error,
+                            PPTP_PLUGIN_UI_ERROR,
+                            PPTP_PLUGIN_UI_ERROR_UNKNOWN,
+                            "PPTP import is not implemented");
        return NULL;
 }
 
 gboolean
 do_export (const char *path, NMConnection *connection, GError **error)
 {
+       g_set_error_literal (error,
+                            PPTP_PLUGIN_UI_ERROR,
+                            PPTP_PLUGIN_UI_ERROR_UNKNOWN,
+                            "PPTP export is not implemented");
        return FALSE;
 }
-
-
-
diff --git a/properties/nm-pptp.c b/properties/nm-pptp.c
index 6cce89f..5743383 100644
--- a/properties/nm-pptp.c
+++ b/properties/nm-pptp.c
@@ -675,7 +675,7 @@ get_suggested_filename (NMVpnEditorPlugin *iface, NMConnection *connection)
 static NMVpnEditorPluginCapability
 get_capabilities (NMVpnEditorPlugin *iface)
 {
-       return (NM_VPN_EDITOR_PLUGIN_CAPABILITY_IMPORT | NM_VPN_EDITOR_PLUGIN_CAPABILITY_EXPORT);
+       return NM_VPN_EDITOR_PLUGIN_CAPABILITY_NONE;
 }
 
 static NMVpnEditor *


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