[network-manager-openvpn/th/export-bgo764132: 19/27] properties: refactor do_export() (refactor handling gateways)
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn/th/export-bgo764132: 19/27] properties: refactor do_export() (refactor handling gateways)
- Date: Fri, 25 Mar 2016 19:49:49 +0000 (UTC)
commit 3c580a387fccb7d8a07071e0fd263c2011313e94
Author: Thomas Haller <thaller redhat com>
Date: Thu Mar 24 11:26:19 2016 +0100
properties: refactor do_export() (refactor handling gateways)
properties/import-export.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/properties/import-export.c b/properties/import-export.c
index c3cd422..090d541 100644
--- a/properties/import-export.c
+++ b/properties/import-export.c
@@ -1645,7 +1645,7 @@ do_export_create (NMConnection *connection, const char *path, GError **error)
NMSettingIPConfig *s_ip4;
NMSettingVpn *s_vpn;
const char *value;
- const char *gateways = NULL;
+ const char *gateways;
char **gw_list, **gw_iter;
gs_free char *cacert = NULL;
const char *connection_type;
@@ -1689,10 +1689,8 @@ do_export_create (NMConnection *connection, const char *path, GError **error)
return NULL;
}
- value = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_REMOTE);
- if (_arg_is_set (value))
- gateways = value;
- else {
+ gateways = _arg_is_set (nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_REMOTE));
+ if (!gateways) {
g_set_error_literal (error,
OPENVPN_EDITOR_PLUGIN_ERROR,
OPENVPN_EDITOR_PLUGIN_ERROR_FILE_NOT_OPENVPN,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]