[network-manager-openvpn] properties/trivial: rename internal error define NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_OPENVPN



commit c2521a5432dffbadbde75adf27e3a16ccab95ef8
Author: Thomas Haller <thaller redhat com>
Date:   Wed May 11 10:12:39 2016 +0200

    properties/trivial: rename internal error define NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_OPENVPN
    
    ... to NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_VPN. We use a similar define for other
    VPN plugins, no need to name them differently between plugins: it serves the same
    purpose.

 properties/import-export.c            |   12 ++++++------
 properties/nm-openvpn-editor-plugin.c |    2 +-
 shared/nm-default.h                   |    4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/properties/import-export.c b/properties/import-export.c
index 8e77419..93d7b46 100644
--- a/properties/import-export.c
+++ b/properties/import-export.c
@@ -1386,7 +1386,7 @@ handle_line_error:
        if (!have_client && !have_sk) {
                g_set_error_literal (error,
                                     NMV_EDITOR_PLUGIN_ERROR,
-                                    NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_OPENVPN,
+                                    NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_VPN,
                                     _("The file to import wasn't a valid OpenVPN client configuration"));
                goto out_error;
        }
@@ -1394,7 +1394,7 @@ handle_line_error:
        if (!have_remote) {
                g_set_error_literal (error,
                                     NMV_EDITOR_PLUGIN_ERROR,
-                                    NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_OPENVPN,
+                                    NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_VPN,
                                     _("The file to import wasn't a valid OpenVPN configure (no remote)"));
                goto out_error;
        }
@@ -1626,7 +1626,7 @@ do_export_create (NMConnection *connection, const char *path, GError **error)
        if (!path || !path[0]) {
                g_set_error_literal (error,
                                     NMV_EDITOR_PLUGIN_ERROR,
-                                    NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_OPENVPN,
+                                    NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_VPN,
                                     _("missing path argument"));
                return NULL;
        }
@@ -1636,7 +1636,7 @@ do_export_create (NMConnection *connection, const char *path, GError **error)
        if (!s_con || !s_vpn) {
                g_set_error_literal (error,
                                     NMV_EDITOR_PLUGIN_ERROR,
-                                    NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_OPENVPN,
+                                    NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_VPN,
                                     _("connection is not a valid OpenVPN connection"));
                return NULL;
        }
@@ -1645,7 +1645,7 @@ do_export_create (NMConnection *connection, const char *path, GError **error)
        if (!gateways) {
                g_set_error_literal (error,
                                     NMV_EDITOR_PLUGIN_ERROR,
-                                    NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_OPENVPN,
+                                    NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_VPN,
                                     _("connection was incomplete (missing gateway)"));
                return NULL;
        }
@@ -1946,7 +1946,7 @@ do_export (const char *path, NMConnection *connection, GError **error)
        if (!g_file_set_contents (path, f->str, f->len, &local)) {
                g_set_error (error,
                             NMV_EDITOR_PLUGIN_ERROR,
-                            NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_OPENVPN,
+                            NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_VPN,
                             _("failed to write file: %s"),
                             local->message);
                return FALSE;
diff --git a/properties/nm-openvpn-editor-plugin.c b/properties/nm-openvpn-editor-plugin.c
index 6fd2636..b5e980c 100644
--- a/properties/nm-openvpn-editor-plugin.c
+++ b/properties/nm-openvpn-editor-plugin.c
@@ -77,7 +77,7 @@ import (NMVpnEditorPlugin *iface, const char *path, GError **error)
                     && !g_str_has_suffix (ext, ".ovpntest"))) {   /* Special extension for testcases */
                g_set_error_literal (error,
                                     NMV_EDITOR_PLUGIN_ERROR,
-                                    NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_OPENVPN,
+                                    NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_VPN,
                                     _("unknown OpenVPN file extension"));
                goto out;
        }
diff --git a/shared/nm-default.h b/shared/nm-default.h
index 4a85366..18dec0f 100644
--- a/shared/nm-default.h
+++ b/shared/nm-default.h
@@ -82,7 +82,7 @@
 #define NMV_EDITOR_PLUGIN_ERROR_FAILED              NM_SETTING_VPN_ERROR_UNKNOWN
 #define NMV_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY    NM_SETTING_VPN_ERROR_INVALID_PROPERTY
 #define NMV_EDITOR_PLUGIN_ERROR_MISSING_PROPERTY    NM_SETTING_VPN_ERROR_MISSING_PROPERTY
-#define NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_OPENVPN    NM_SETTING_VPN_ERROR_UNKNOWN
+#define NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_VPN        NM_SETTING_VPN_ERROR_UNKNOWN
 #define NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_READABLE   NM_SETTING_VPN_ERROR_UNKNOWN
 #define NMV_EDITOR_PLUGIN_ERROR_FILE_INVALID        NM_SETTING_VPN_ERROR_UNKNOWN
 
@@ -94,7 +94,7 @@
 #define NMV_EDITOR_PLUGIN_ERROR_FAILED              NM_CONNECTION_ERROR_FAILED
 #define NMV_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY    NM_CONNECTION_ERROR_INVALID_PROPERTY
 #define NMV_EDITOR_PLUGIN_ERROR_MISSING_PROPERTY    NM_CONNECTION_ERROR_MISSING_PROPERTY
-#define NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_OPENVPN    NM_CONNECTION_ERROR_FAILED
+#define NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_VPN        NM_CONNECTION_ERROR_FAILED
 #define NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_READABLE   NM_CONNECTION_ERROR_FAILED
 #define NMV_EDITOR_PLUGIN_ERROR_FILE_INVALID        NM_CONNECTION_ERROR_FAILED
 


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