[network-manager-openconnect/danw/cleanup-bgo746693: 3/4] all: use nm_connection_get_setting_*()
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openconnect/danw/cleanup-bgo746693: 3/4] all: use nm_connection_get_setting_*()
- Date: Tue, 24 Mar 2015 15:26:56 +0000 (UTC)
commit ff6c289294a426d2d338bbdef3ebc648ec018d53
Author: Dan Winship <danw redhat com>
Date: Tue Nov 25 17:23:11 2014 -0500
all: use nm_connection_get_setting_*()
The code was still using nm_connection_get_setting(). Use the typesafe
setting-specific versions instead.
properties/nm-openconnect.c | 6 +++---
src/nm-openconnect-service.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/properties/nm-openconnect.c b/properties/nm-openconnect.c
index 5f4998a..114dbe1 100644
--- a/properties/nm-openconnect.c
+++ b/properties/nm-openconnect.c
@@ -248,9 +248,9 @@ export (NMVpnPluginUiInterface *iface,
return FALSE;
}
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ s_con = nm_connection_get_setting_connection (connection);
- s_vpn = (NMSettingVPN *) nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN);
+ s_vpn = nm_connection_get_setting_vpn (connection);
value = nm_setting_vpn_get_data_item (s_vpn, NM_OPENCONNECT_KEY_GATEWAY);
if (value && strlen (value))
@@ -517,7 +517,7 @@ init_plugin_ui (OpenconnectPluginUiWidget *self, NMConnection *connection, GErro
GtkWidget *widget;
const char *value;
- s_vpn = (NMSettingVPN *) nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN);
+ s_vpn = nm_connection_get_setting_vpn (connection);
priv->group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
diff --git a/src/nm-openconnect-service.c b/src/nm-openconnect-service.c
index 9254536..92d40d9 100644
--- a/src/nm-openconnect-service.c
+++ b/src/nm-openconnect-service.c
@@ -488,7 +488,7 @@ real_connect (NMVPNPlugin *plugin,
NMSettingVPN *s_vpn;
gint openconnect_fd = -1;
- s_vpn = NM_SETTING_VPN (nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN));
+ s_vpn = nm_connection_get_setting_vpn (connection);
g_assert (s_vpn);
if (!nm_openconnect_properties_validate (s_vpn, error))
goto out;
@@ -517,7 +517,7 @@ real_need_secrets (NMVPNPlugin *plugin,
g_return_val_if_fail (NM_IS_VPN_PLUGIN (plugin), FALSE);
g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE);
- s_vpn = NM_SETTING_VPN (nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN));
+ s_vpn = nm_connection_get_setting_vpn (connection);
if (!s_vpn) {
g_set_error (error,
NM_VPN_PLUGIN_ERROR,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]