summaryrefslogtreecommitdiff
path: root/daemon/gvfsjobopenforread.c
Commit message (Collapse)AuthorAgeFilesLines
* daemon: Emit signal before returning dbus valueRoss Lagerwall2013-09-301-6/+6
| | | | | | | | | | | | | | | | | | | | | | In gvfsjobopenforread.c, the dbus method returns a value in create_reply which eventually results in a GVfsJobRead job to be sent to the backend. This could happen before the "new-source" signal is emitted. If this happens, the job is not queued because the "new_job" signal would not have been connected to a job source yet. The read then hangs because the GVfsJobRead is lost. This is hit often when performing large smb transfers (see https://bugzilla.gnome.org/show_bug.cgi?id=697782 and https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1075923). It can be reproduced by putting a small sleep before the g_signal_emit_by_name call. Fix this by emitting the "new-source" signal *before* the dbus method value is returned. This ensures that the "new_job" signal is set up before any further jobs are sent. Note that the same problem and solution applies for gvfsjobopenforwrite.c.
* gvfschannel: Return proper error if we're out of free fdsTomas Bzatek2013-04-031-1/+11
| | | | | | | | | | | | | | | | In case of too many open files within the process the g_vfs_channel_init() call fails on socketpair and subsequent g_vfs_channel_steal_remote_fd() call returns -1 for the fd. Then g_unix_fd_list_append() hits the assert and doesn't set an error we're dereferencing afterwards. This patch doesn't solve the lack of free fds situation and since glib heavily depends on it it would fail somewhere else. We're just fixing the segfault and returning nicer error. Based on a fix suggested by Stephen M. Webb https://bugzilla.gnome.org/show_bug.cgi?id=696713
* gdbus: Remove debug printsTomas Bzatek2012-07-311-2/+0
|
* gdbus: Use G_VARIANT_TYPE_HANDLE for fd_id argumentsTomas Bzatek2012-07-311-2/+6
|
* gdbus: Port the OpenIconForRead operationTomas Bzatek2012-07-311-1/+4
|
* gdbus: Core daemon and client portTomas Bzatek2012-07-311-61/+42
| | | | | | | | | | | Port of most of the gvfs core, few bits still missing. Lot of debug prints around, will be removed in further commits. Same amount of TODOs and FIXMEs. Notes: * kill serials? * get rid of mainloops where applicable (copy/move progress callback, enumerator) * fix keyring integration * use gdbus builtin fd passing within gvfsdaemon.c, kill the extra_fd stuff
* Update the Address of the FSFFelix Möller2012-07-301-2/+2
| | | | | | | | | | | | | | | Updating the address of the FSF. This has been done by: while read file; do sed -i 's:59 Temple Place:51 Franklin Street:' $file sed -i 's:Suite 330:Fifth Floor:' $file sed -i 's:02111-1307:02110-1301:' $file done https://bugzilla.gnome.org/show_bug.cgi?id=656598 Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
* Don't leak dbus messagesAlexander Larsson2011-04-151-0/+1
| | | | | We're missing a lot of dbus_message_unref after sending messages, add them.
* Rename gdbusutils.h to avoid conflict with GIO1.6.2Matthias Clasen2010-05-271-1/+1
| | | | This makes gvfs build with recent glib again, see bug #619537
* Bug 587484 – Interaction when unmounting mounts and misc fixesDavid Zeuthen2009-07-081-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Port everything to use _with_operation() variants of unmount/eject methods - Add support for g_file_poll_mountable() - new job class: GVfsJobPollMountable - Pass mount operation for unmount/eject ops on GDaemonFile and GDaemonMount - receive in the appropriate GVfsJob classes - also pass unmount flags where it was missing - port all backends to use this - Teach GMountSource and GMountOperationDBus about the new GMountOperation::show-processes signal - also provide new API - g_mount_source_is_dummy() - e.g. when the client didn't passed NULL for the GMountOperation - g_mount_source_abort() - to send the ::abort signal to the client-side GMountOperation - make the client-side of GMountSource return ::reply with NOT_HANDLED when we do an abort - Refactor the mount operation handling in GProxyVolumeMonitor - Pass mount operation for unmount/ejects in GProxyVolumeMonitor - Pass the process id of the actual reader/writer in OpenForRead and OpenForWrite daemon methods - add some private API for making the FUSE client set the pid of the POSIX client (otherwise it looks like the FUSE client is blocking) and pass the right pid. This is because the FUSE client is basically impersonating the POSIX processes. - Make the process id mentioned above available in appropriate GVfsJob classes - GVfsJobOpenForRead - GVfsJobOpenForWrite - GVfsChannel - Provide API to get a list of all blocking clients, e.g. an array of GPid - g_vfs_daemon_get_blocking_processes() - Provide convenience API to easily doing the right thing on unmount; e.g. interact with the user about blocking processes - see the gphoto2 backend for example usage - g_vfs_backend_has_blocking_processes() - g_vfs_backend_unmount_with_operation() and g_vfs_backend_unmount_with_operation_finish() - Only the gphoto2 backend supports ::show-processes right now. Support for other backends will be added shortly. - Implement support for ::show-processes in the GDU volume monitor - right now we don't support "Unmount Anyway" since it requires ABI changes in libgdu.so - this will be changed as soon as there's a new gnome-disk-utility release
* Code cleanup from Kjartan: Removes unused code/variables. Uses rightAlexander Larsson2008-02-191-6/+5
| | | | | | | | | | | | | | | 2008-02-19 Alexander Larsson <alexl@redhat.com> * lots of *.c files: Code cleanup from Kjartan: Removes unused code/variables. Uses right printf types Uses non-deprecated dbus calls. Removes spurious ; and , deleted extra checks for NULL for g_free svn path=/trunk/; revision=1302
* Add copyright information to source files.Christian Kellner2007-11-011-0/+22
| | | | | | | | | | | | 2007-11-01 Christian Kellner <gicmo@gnome.org> * client/*.[ch]: * common/*.[ch]: * daemon/*.[ch]: * test/*.[ch]: Add copyright information to source files. svn path=/trunk/; revision=1007
* Check for unsupported operations and return error instead of crashing,Alexander Larsson2007-09-131-0/+7
| | | | | | Original git commit by Alexander Larsson <alexl@redhat.com> at 1183457271 +0200 svn path=/trunk/; revision=604
* Fix race condition where we accept GVfsChannel requests before the channel ↵Alexander Larsson2007-09-131-5/+2
| | | | | | | | has been registered with the daemon and it has connected to the new_job signal (meaning we can miss the first job). Original git commit by Alexander Larsson <alexl@redhat.com> at 1183368233 +0200 svn path=/trunk/; revision=593
* Rename dbus gerror helpers and use the best one in each caseAlexander Larsson2007-09-131-1/+1
| | | | | | Original git commit by Alexander Larsson <alexl@redhat.com> at 1178537880 +0200 svn path=/trunk/; revision=524
* G_TYPE_VFS_xxx -> G_VFS_TYPE_xxxAlexander Larsson2007-09-131-2/+2
| | | | | | Original git commit by Alexander Larsson <alex@greebo.(none)> at 1171636716 +0100 svn path=/trunk/; revision=356
* Move generic code from GVfsReadChannel to GVfsChannel base classAlexander Larsson2007-09-131-9/+3
| | | | | | Original git commit by Alexander Larsson <alex@greebo.(none)> at 1171634935 +0100 svn path=/trunk/; revision=354
* Only emit new-source when operation succeededAlexander Larsson2007-09-131-1/+2
| | | | | | Original git commit by Alexander Larsson <alex@greebo.(none)> at 1170163638 +0100 svn path=/trunk/; revision=281
* Move code shared between client and daemon to common directoryAlexander Larsson2007-09-131-2/+3
| | | | | | Original git commit by Alexander Larsson <alex@greebo.(none)> at 1169730469 +0100 svn path=/trunk/; revision=263
* New thread model for GVfsDaemonAlexander Larsson2007-09-131-6/+24
| | | | | | Original git commit by Alexander Larsson <alex@greebo.(none)> at 1169224526 +0100 svn path=/trunk/; revision=259
* New model to handle uris. All uri -> dbus mapping is done client side.Alexander Larsson2007-09-131-8/+7
| | | | | | | | The mappings will be specified in a config file the client reads Original git commit by Alexander Larsson <alex@greebo.(none)> at 1165844556 +0100 svn path=/trunk/; revision=222
* Initial work on the new way to track mountpoints.Alexander Larsson2007-09-131-3/+3
| | | | | | | | Daemon side only. Original git commit by Alexander Larsson <alex@greebo.(none)> at 1165492556 +0100 svn path=/trunk/; revision=219
* Rename GVfsReadStream to GVfsReadChannelAlexander Larsson2007-09-131-54/+29
| | | | | | | | | | | Make GVfsJobDBus class to share code Make GVfsJob backend be construct property Implement daemon-side support for dbus call cancellation Finish dbus call cancellation client-side Original git commit by Alexander Larsson <alex@greebo.(none)> at 1165257484 +0100 svn path=/trunk/; revision=217
* Allow multiple backend in one daemonAlexander Larsson2007-09-131-4/+7
| | | | | | Original git commit by Alexander Larsson <alex@greebo.(none)> at 1164972080 +0100 svn path=/trunk/; revision=207
* Keep a ref to the dbus connection to avoid it going awayAlexander Larsson2007-09-131-1/+4
| | | | | | Original git commit by Alexander Larsson <alex@localhost.localdomain> at 1163766970 +0100 svn path=/trunk/; revision=174
* Implement seekAlexander Larsson2007-09-131-0/+10
| | | | | | Original git commit by Alexander Larsson <alex@localhost.localdomain> at 1163674878 +0100 svn path=/trunk/; revision=156
* Move backend class calls int gvfsbackend.cAlexander Larsson2007-09-131-6/+3
| | | | | | Original git commit by Alexander Larsson <alex@localhost.localdomain> at 1161857195 +0200 svn path=/trunk/; revision=130
* Rename GVfsDaemonBackend to GVfsBackendAlexander Larsson2007-09-131-2/+2
| | | | | | Original git commit by Alexander Larsson <alex@localhost.localdomain> at 1161855599 +0200 svn path=/trunk/; revision=129
* Further daemon workAlexander Larsson2007-09-131-3/+1
| | | | | | Original git commit by Alexander Larsson <alex@localhost.localdomain> at 1161788031 +0200 svn path=/trunk/; revision=128
* Initial work on readAlexander Larsson2007-09-131-15/+33
| | | | | | Original git commit by Alexander Larsson <alex@localhost.localdomain> at 1161685777 +0200 svn path=/trunk/; revision=121
* More work on daemon scheduling etcAlexander Larsson2007-09-131-0/+177
Original git commit by Alexander Larsson <alex@localhost.localdomain> at 1161615951 +0200 svn path=/trunk/; revision=119