[network-manager-applet/th/vpn-auth-dialog-bgo765329: 2/2] fixup! applet: load VPN auth-dialog via NMVpnPluginInfo instead of manually loading keyfile
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/th/vpn-auth-dialog-bgo765329: 2/2] fixup! applet: load VPN auth-dialog via NMVpnPluginInfo instead of manually loading keyfile
- Date: Fri, 22 Apr 2016 07:55:04 +0000 (UTC)
commit 6e725e8915ee63b512f4ad8d05d9b328b2c9b3ca
Author: Thomas Haller <thaller redhat com>
Date: Fri Apr 22 09:29:55 2016 +0200
fixup! applet: load VPN auth-dialog via NMVpnPluginInfo instead of manually loading keyfile
src/applet-vpn-request.c | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/src/applet-vpn-request.c b/src/applet-vpn-request.c
index c65069a..3395eb9 100644
--- a/src/applet-vpn-request.c
+++ b/src/applet-vpn-request.c
@@ -169,29 +169,23 @@ find_auth_dialog_binary (const char *service,
gboolean *out_hints_supported,
GError **error)
{
- char *prog = NULL;
const char *auth_dialog;
- GSList *plugins;
- NMVpnPluginInfo *plugin;
+ gs_unref_object NMVpnPluginInfo *plugin = NULL;
- plugins = nm_vpn_plugin_info_list_load ();
- plugin = nm_vpn_plugin_info_list_find_by_service (plugins, service);
+ plugin = nm_vpn_plugin_info_new_search_file (NULL, service);
auth_dialog = plugin ? nm_vpn_plugin_info_get_auth_dialog (plugin) : NULL;
-
if (!auth_dialog) {
g_set_error (error,
NM_SECRET_AGENT_ERROR,
NM_SECRET_AGENT_ERROR_FAILED,
"Could not find the authentication dialog for VPN connection type '%s'",
service);
- } else {
- prog = g_strdup (auth_dialog);
- *out_hints_supported = nm_vpn_plugin_info_supports_hints (plugin);
+ return NULL;
}
- g_slist_free_full (plugins, g_object_unref);
- return prog;
+ *out_hints_supported = nm_vpn_plugin_info_supports_hints (plugin);
+ return g_strdup (auth_dialog);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]