mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 05:00:15 +01:00
2007-09-26 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-vpn-plugin.c - (impl_vpn_plugin_need_secrets): fix logic when no secrets are needed git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2896 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
00b8633a3e
commit
6e47b9a495
2 changed files with 18 additions and 6 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2007-09-26 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* libnm-glib/nm-vpn-plugin.c
|
||||
- (impl_vpn_plugin_need_secrets): fix logic when no secrets are needed
|
||||
|
||||
2007-09-26 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* include/NetworkManagerVPN.h
|
||||
|
|
|
|||
|
|
@ -342,6 +342,7 @@ impl_vpn_plugin_need_secrets (NMVPNPlugin *plugin,
|
|||
NMConnection *connection;
|
||||
char *sn = NULL;
|
||||
GError *ns_err = NULL;
|
||||
gboolean needed = FALSE;
|
||||
|
||||
g_return_val_if_fail (NM_IS_VPN_PLUGIN (plugin), FALSE);
|
||||
g_return_val_if_fail (properties != NULL, FALSE);
|
||||
|
|
@ -362,14 +363,20 @@ impl_vpn_plugin_need_secrets (NMVPNPlugin *plugin,
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (NM_VPN_PLUGIN_GET_CLASS (plugin)->need_secrets (plugin, connection, &sn, &ns_err)) {
|
||||
g_assert (sn);
|
||||
*setting_name = g_strdup (sn);
|
||||
ret = TRUE;
|
||||
} else {
|
||||
g_assert (ns_err);
|
||||
needed = NM_VPN_PLUGIN_GET_CLASS (plugin)->need_secrets (plugin, connection, &sn, &ns_err);
|
||||
if (ns_err) {
|
||||
*err = g_error_copy (ns_err);
|
||||
g_error_free (ns_err);
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = TRUE;
|
||||
if (needed) {
|
||||
g_assert (sn);
|
||||
*setting_name = g_strdup (sn);
|
||||
} else {
|
||||
/* No secrets required */
|
||||
*setting_name = g_strdup ("");
|
||||
}
|
||||
|
||||
out:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue