diff options
author | Alexander Larsson <alexl@redhat.com> | 2008-09-23 19:16:06 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2008-09-23 19:16:06 +0000 |
commit | 0d1cff0829a4a1f4ce1095d9da694dcaaa74f024 (patch) | |
tree | 145acf6acb21ab39e0bc43deab47b365ec781156 /client/gdaemonvfs.c | |
parent | cc32fbdb7b1b52d7d28f31a4e967a99438ad68db (diff) | |
download | gvfs-0d1cff0829a4a1f4ce1095d9da694dcaaa74f024.tar.gz |
Only call the IsSupported dbus call when the class is actually needed
2008-09-23 Alexander Larsson <alexl@redhat.com>
* monitor/proxy/gproxyvolumemonitor.[ch]:
* monitor/proxy/gproxyvolumemonitor.h:
* monitor/proxy/remote-volume-monitor-module.c:
Only call the IsSupported dbus call when the class
is actually needed instead of on gio init.
Don't integrate internal session bus with mainloop
during is_support code, as that is not necessary yet, and
it caused problem if done in a thread.
This fixes the trash crash issue in bug #547568.
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.
svn path=/trunk/; revision=2021
Diffstat (limited to 'client/gdaemonvfs.c')
-rw-r--r-- | client/gdaemonvfs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/client/gdaemonvfs.c b/client/gdaemonvfs.c index e4f9164a..7479bd82 100644 --- a/client/gdaemonvfs.c +++ b/client/gdaemonvfs.c @@ -983,6 +983,14 @@ g_io_module_load (GIOModule *module) 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)); |