summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2014-11-04 12:47:04 +0100
committerOndrej Holy <oholy@redhat.com>2014-11-06 11:14:07 +0100
commit14032ee48bab618e9e7c75134f1c653e996bc4dd (patch)
treee5d66482ccaa504a75175451d6593f19dfc7d056
parent50bb750fe9bcae0d333a1ec40a5d161ab6ba1741 (diff)
downloadgvfs-14032ee48bab618e9e7c75134f1c653e996bc4dd.tar.gz
mtp: limit number of threads
Mtp backend doesn't limit number of threads, however all methods are executed with locked mutex thus multiple threads isn't needed. Do not waste resources and limit maximal number of threads to one. This patch could potentially avoid some crashes during unmount. https://bugzilla.gnome.org/show_bug.cgi?id=739575
-rw-r--r--daemon/Makefile.am1
1 files changed, 1 insertions, 0 deletions
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index a6a9ae1e..7a4b01bb 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -493,6 +493,7 @@ gvfsd_mtp_CPPFLAGS = \
$(flags) \
-DBACKEND_HEADER=gvfsbackendmtp.h \
-DDEFAULT_BACKEND_TYPE=mtp \
+ -DMAX_JOB_THREADS=1 \
-DBACKEND_TYPES='"mtp", G_VFS_TYPE_BACKEND_MTP,' \
$(GUDEV_CFLAGS) $(LIBMTP_CFLAGS)