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:
Dan Williams 2007-09-27 03:03:09 +00:00
parent 00b8633a3e
commit 6e47b9a495
2 changed files with 18 additions and 6 deletions

View file

@ -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

View file

@ -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: