[network-manager-applet/th/vpn-plugin-info-bgo749877: 3/6] fixup! vpn: make use of new NMVpnPluginInfo class to load vpn plugins



commit 716f95e8cb649bcc536571625e98a3b8676b2144
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Fri Jul 24 16:52:35 2015 +0200

    fixup! vpn: make use of new NMVpnPluginInfo class to load vpn plugins

 src/connection-editor/vpn-helpers.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/connection-editor/vpn-helpers.c b/src/connection-editor/vpn-helpers.c
index 190db40..808f4fe 100644
--- a/src/connection-editor/vpn-helpers.c
+++ b/src/connection-editor/vpn-helpers.c
@@ -64,14 +64,19 @@ vpn_get_plugins ()
        while (p) {
                NMVpnPluginInfo *plugin_info = NM_VPN_PLUGIN_INFO (p->data);
                NMVpnEditorPlugin *plugin;
+               GError *error = NULL;
 
                /* load the editor plugin, and preserve only those NMVpnPluginInfo that can
                 * successfully load the plugin. */
-               plugin = nm_vpn_plugin_info_load_editor_plugin (plugin_info, NULL);
-               if (plugin)
+               plugin = nm_vpn_plugin_info_load_editor_plugin (plugin_info, &error);
+               if (plugin) {
                        plugins = g_slist_prepend (plugins, plugin_info);
-               else
+               } else {
+                       g_warning ("Could not load '%s' plugin: %s",
+                                  nm_vpn_plugin_info_get_name (plugin_info),
+                                  error->message);
                        g_object_unref (plugin_info);
+               }
                p = g_slist_delete_link (p, p);
        }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]