[gvfs] Don't use gvfs in the daemons unless necessary



commit 79a53dc1b86b35dfbeb377e13f760d6817f7597b
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Oct 11 23:18:02 2012 +0200

    Don't use gvfs in the daemons unless necessary
    
    Most backends don't need gvfs support, although they
    may use local GFiles. For these we enforce the use
    of the local file GVfs implementation to avoid weird
    complexity with backends depending on gvfs itself.

 daemon/Makefile.am           |    4 ++++
 daemon/daemon-main-generic.c |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 1cb0cba..0df6cf8 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -321,6 +321,7 @@ gvfsd_recent_CPPFLAGS = \
 	-DBACKEND_HEADER=gvfsbackendrecent.h \
 	-DDEFAULT_BACKEND_TYPE=recent \
 	-DMAX_JOB_THREADS=10 \
+	-DBACKEND_USES_GVFS=1 \
 	-DBACKEND_TYPES='"recent", G_VFS_TYPE_BACKEND_RECENT,' \
 	$(GTK_CFLAGS)
 
@@ -348,6 +349,7 @@ gvfsd_network_CPPFLAGS = \
 	-DBACKEND_HEADER=gvfsbackendnetwork.h \
 	-DDEFAULT_BACKEND_TYPE=network \
 	-DMAX_JOB_THREADS=1 \
+	-DBACKEND_USES_GVFS=1 \
 	-DBACKEND_TYPES='"network", G_VFS_TYPE_BACKEND_NETWORK,'
 
 gvfsd_network_LDADD = $(libraries)
@@ -377,6 +379,7 @@ gvfsd_archive_CPPFLAGS = \
 	-DDEFAULT_BACKEND_TYPE=archive \
 	-DMAX_JOB_THREADS=1 \
 	$(ARCHIVE_CFLAGS) \
+	-DBACKEND_USES_GVFS=1 \
 	-DBACKEND_TYPES='"archive", G_VFS_TYPE_BACKEND_ARCHIVE,'
 
 gvfsd_archive_LDADD = $(libraries) $(ARCHIVE_LIBS)
@@ -491,6 +494,7 @@ gvfsd_afc_CPPFLAGS = \
 	-DDEFAULT_BACKEND_TYPE=afc \
 	-DMAX_JOB_THREADS=1 \
 	$(AFC_CFLAGS) \
+	-DBACKEND_USES_GVFS=1 \
 	-DBACKEND_TYPES='"afc", G_VFS_TYPE_BACKEND_AFC,'
 
 gvfsd_afc_LDADD = \
diff --git a/daemon/daemon-main-generic.c b/daemon/daemon-main-generic.c
index 3060752..dddfcff 100644
--- a/daemon/daemon-main-generic.c
+++ b/daemon/daemon-main-generic.c
@@ -30,6 +30,9 @@
 int
 main (int argc, char *argv[])
 {
+#ifndef BACKEND_USES_GVFS
+  g_setenv ("GIO_USE_VFS", "local", TRUE);
+#endif
   daemon_init ();
 #ifdef BACKEND_SETUP_FUNC
   BACKEND_SETUP_FUNC ();



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