network-manager-applet r775 - in trunk: . src/connection-editor
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: network-manager-applet r775 - in trunk: . src/connection-editor
- Date: Thu, 3 Jul 2008 12:47:23 +0000 (UTC)
Author: dcbw
Date: Thu Jul 3 12:47:23 2008
New Revision: 775
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=775&view=rev
Log:
2008-07-03 Dan Williams <dcbw redhat com>
* src/connection-editor/vpn-helpers.c
src/connection-editor/Makefile.am
- (vpn_get_plugins): expect VPN GUI plugins to be in $LIBDIR
Modified:
trunk/ChangeLog
trunk/src/connection-editor/Makefile.am
trunk/src/connection-editor/vpn-helpers.c
Modified: trunk/src/connection-editor/Makefile.am
==============================================================================
--- trunk/src/connection-editor/Makefile.am (original)
+++ trunk/src/connection-editor/Makefile.am Thu Jul 3 12:47:23 2008
@@ -8,6 +8,7 @@
-DGLADEDIR=\""$(gladedir)"\" \
-DBINDIR=\""$(bindir)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
+ -DLIBDIR=\""$(libdir)"\" \
-DNMALOCALEDIR=\"$(datadir)/locale\" \
$(DBUS_CFLAGS) \
$(POLKIT_CFLAGS) \
Modified: trunk/src/connection-editor/vpn-helpers.c
==============================================================================
--- trunk/src/connection-editor/vpn-helpers.c (original)
+++ trunk/src/connection-editor/vpn-helpers.c Thu Jul 3 12:47:23 2008
@@ -70,10 +70,9 @@
(GDestroyNotify) g_free, (GDestroyNotify) g_object_unref);
while ((f = g_dir_read_name (dir))) {
- char *path = NULL;
+ char *path = NULL, *service = NULL;
+ char *so_path = NULL, *so_name = NULL;
GKeyFile *keyfile = NULL;
- char *so_path = NULL;
- char *service = NULL;
GModule *module;
NMVpnPluginUiFactory factory = NULL;
@@ -94,6 +93,14 @@
if (!so_path)
goto next;
+ /* Remove any path and extension components, then reconstruct path
+ * to the SO in LIBDIR
+ */
+ so_name = g_path_get_basename (so_path);
+ g_free (so_path);
+ so_path = g_strdup_printf ("%s/%s", LIBDIR, so_name);
+ g_free (so_name);
+
module = g_module_open (so_path, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
if (!module) {
g_set_error (error, 0, 0, "Cannot load the VPN plugin which provides the "
@@ -144,6 +151,7 @@
}
next:
+ g_free (so_path);
g_free (service);
g_key_file_free (keyfile);
g_free (path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]