gvfs r2019 - in branches/gnome-2-24: . client common monitor/gphoto2 monitor/hal monitor/proxy
- From: alexl svn gnome org
- To: svn-commits-list gnome org
- Subject: gvfs r2019 - in branches/gnome-2-24: . client common monitor/gphoto2 monitor/hal monitor/proxy
- Date: Tue, 23 Sep 2008 13:05:14 +0000 (UTC)
Author: alexl
Date: Tue Sep 23 13:05:14 2008
New Revision: 2019
URL: http://svn.gnome.org/viewvc/gvfs?rev=2019&view=rev
Log:
2008-09-23 Alexander Larsson <alexl redhat com>
* client/Makefile.am:
* common/Makefile.am:
* common/gmountsource.c:
* common/gmounttracker.c:
* monitor/gphoto2/Makefile.am:
* monitor/hal/Makefile.am:
* monitor/proxy/Makefile.am:
Link all modules against the installed libgvfscommon instead
of duplicating the statically linked one. This is safe wrt
namespace conflicts, because the modules are opened RTLD_LOCAL
so the dependencies will not pollute the global namespace.
* client/gdaemonvfs.c:
Make the gvfsdbus module persistant. This means we will never
unload it, and thus not unload libgvfscommon which could
be problematic. This is not a huge problem, as:
+ The gio modules will not be loaded anyway unless you use gio
+ The gvfsdbus module will be persistent anyway as soon as
the app references the GVfs object, which likely all gio apps do
+ The module load order doesn't matter wrt unload order, because
all gio modules are loaded before any one is unloaded.
Modified:
branches/gnome-2-24/ChangeLog
branches/gnome-2-24/client/Makefile.am
branches/gnome-2-24/client/gdaemonvfs.c
branches/gnome-2-24/common/Makefile.am
branches/gnome-2-24/common/gmountsource.c
branches/gnome-2-24/common/gmounttracker.c
branches/gnome-2-24/monitor/gphoto2/Makefile.am
branches/gnome-2-24/monitor/hal/Makefile.am
branches/gnome-2-24/monitor/proxy/Makefile.am
Modified: branches/gnome-2-24/client/Makefile.am
==============================================================================
--- branches/gnome-2-24/client/Makefile.am (original)
+++ branches/gnome-2-24/client/Makefile.am Tue Sep 23 13:05:14 2008
@@ -39,7 +39,7 @@
$(NULL)
vfslibs = \
- $(top_builddir)/common/libgvfscommon-noin.la \
+ $(top_builddir)/common/libgvfscommon.la \
$(DBUS_LIBS) \
$(GLIB_LIBS) \
$(NULL)
Modified: branches/gnome-2-24/client/gdaemonvfs.c
==============================================================================
--- branches/gnome-2-24/client/gdaemonvfs.c (original)
+++ branches/gnome-2-24/client/gdaemonvfs.c Tue Sep 23 13:05:14 2008
@@ -983,6 +983,14 @@
if (g_getenv ("DBUS_SESSION_BUS_ADDRESS") == NULL)
return;
+ /* Make this module resident so that we ground the common
+ * library. If that is unloaded we could get into all kinds
+ * of strange situations. This is safe to do even if we loaded
+ * some other common-using module first as all modules are loaded
+ * before any are freed.
+ */
+ g_type_module_use (G_TYPE_MODULE (module));
+
g_daemon_vfs_register_type (G_TYPE_MODULE (module));
g_daemon_volume_monitor_register_types (G_TYPE_MODULE (module));
Modified: branches/gnome-2-24/common/Makefile.am
==============================================================================
--- branches/gnome-2-24/common/Makefile.am (original)
+++ branches/gnome-2-24/common/Makefile.am Tue Sep 23 13:05:14 2008
@@ -1,6 +1,5 @@
NULL =
-noinst_LTLIBRARIES = libgvfscommon-noin.la
lib_LTLIBRARIES=libgvfscommon.la
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/gvfs \
@@ -9,7 +8,7 @@
-DG_LOG_DOMAIN=\"GVFS\" -DG_DISABLE_DEPRECATED \
-DDBUS_API_SUBJECT_TO_CHANGE
-libgvfscommon_noin_la_SOURCES = \
+libgvfscommon_la_SOURCES = \
gsysutils.c gsysutils.h \
gdbusutils.c gdbusutils.h \
gmountspec.c gmountspec.h \
@@ -19,9 +18,6 @@
gvfsdaemonprotocol.c gvfsdaemonprotocol.h \
$(NULL)
-libgvfscommon_noin_la_LIBADD = \
+libgvfscommon_la_LIBADD = \
$(DBUS_LIBS) \
$(GLIB_LIBS)
-
-libgvfscommon_la_SOURCES =
-libgvfscommon_la_LIBADD = libgvfscommon-noin.la
Modified: branches/gnome-2-24/common/gmountsource.c
==============================================================================
--- branches/gnome-2-24/common/gmountsource.c (original)
+++ branches/gnome-2-24/common/gmountsource.c Tue Sep 23 13:05:14 2008
@@ -35,32 +35,7 @@
char *obj_path;
};
-/* We use this hack to avoid problems when this code
- is shared in both the daemon and the client */
-static GType _g_mount_source_get_type (void) G_GNUC_CONST;
-
-#define g_mount_source_get_type _g_mount_source_get_type
G_DEFINE_TYPE (GMountSource, g_mount_source, G_TYPE_OBJECT)
-#undef g_mount_source_get_type
-
-GType
-g_mount_source_get_type (void)
-{
- static volatile gsize type_volatile = 0;
-
- if (g_once_init_enter (&type_volatile))
- {
- GType type;
-
- type = g_type_from_name ("GMountSource");
- if (type == 0)
- type = _g_mount_source_get_type ();
-
- g_once_init_leave (&type_volatile, type);
- }
-
- return type_volatile;
-}
static void
g_mount_source_finalize (GObject *object)
Modified: branches/gnome-2-24/common/gmounttracker.c
==============================================================================
--- branches/gnome-2-24/common/gmounttracker.c (original)
+++ branches/gnome-2-24/common/gmounttracker.c Tue Sep 23 13:05:14 2008
@@ -54,33 +54,7 @@
DBusConnection *connection;
};
-/* We use this hack to avoid problems when this code
- is shared in both the daemon and the client */
-static GType _g_mount_tracker_get_type (void) G_GNUC_CONST;
-
-#define g_mount_tracker_get_type _g_mount_tracker_get_type
G_DEFINE_TYPE (GMountTracker, g_mount_tracker, G_TYPE_OBJECT)
-#undef g_mount_tracker_get_type
-
-GType
-g_mount_tracker_get_type (void)
-{
- static volatile gsize type_volatile = 0;
-
- if (g_once_init_enter (&type_volatile))
- {
- GType type;
-
- type = g_type_from_name ("GMountTracker");
- if (type == 0)
- type = _g_mount_tracker_get_type ();
-
- g_once_init_leave (&type_volatile, type);
- }
-
- return type_volatile;
-}
-
static DBusHandlerResult g_mount_tracker_filter_func (DBusConnection *conn,
DBusMessage *message,
Modified: branches/gnome-2-24/monitor/gphoto2/Makefile.am
==============================================================================
--- branches/gnome-2-24/monitor/gphoto2/Makefile.am (original)
+++ branches/gnome-2-24/monitor/gphoto2/Makefile.am Tue Sep 23 13:05:14 2008
@@ -40,7 +40,7 @@
gvfs_gphoto2_volume_monitor_LDADD = \
$(GLIB_LIBS) \
$(HAL_LIBS) \
- $(top_builddir)/common/libgvfscommon-noin.la \
+ $(top_builddir)/common/libgvfscommon.la \
$(top_builddir)/monitor/proxy/libgvfsproxyvolumemonitordaemon-noin.la \
$(NULL)
Modified: branches/gnome-2-24/monitor/hal/Makefile.am
==============================================================================
--- branches/gnome-2-24/monitor/hal/Makefile.am (original)
+++ branches/gnome-2-24/monitor/hal/Makefile.am Tue Sep 23 13:05:14 2008
@@ -42,7 +42,7 @@
gvfs_hal_volume_monitor_LDADD = \
$(GLIB_LIBS) \
$(HAL_LIBS) \
- $(top_builddir)/common/libgvfscommon-noin.la \
+ $(top_builddir)/common/libgvfscommon.la \
$(top_builddir)/monitor/proxy/libgvfsproxyvolumemonitordaemon-noin.la \
$(NULL)
Modified: branches/gnome-2-24/monitor/proxy/Makefile.am
==============================================================================
--- branches/gnome-2-24/monitor/proxy/Makefile.am (original)
+++ branches/gnome-2-24/monitor/proxy/Makefile.am Tue Sep 23 13:05:14 2008
@@ -33,7 +33,7 @@
libgioremote_volume_monitor_la_LIBADD = \
$(GLIB_LIBS) \
$(DBUS_LIBS) \
- $(top_builddir)/common/libgvfscommon-noin.la \
+ $(top_builddir)/common/libgvfscommon.la \
$(NULL)
############################################################################
@@ -57,7 +57,7 @@
libgvfsproxyvolumemonitordaemon_noin_la_LIBADD = \
$(GLIB_LIBS) \
$(DBUS_LIBS) \
- $(top_builddir)/common/libgvfscommon-noin.la \
+ $(top_builddir)/common/libgvfscommon.la \
$(NULL)
clean-local:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]