summaryrefslogtreecommitdiff
path: root/daemon/gvfschannel.c
Commit message (Collapse)AuthorAgeFilesLines
* daemon: Add logic to force close active channelsChristian Kellner2011-06-061-0/+29
| | | | | | This includes logic in a GVfsChannel to force close is as well as a function in the GVfsDaemon to iterate over all active channels and call the force-close function.
* daemon: Also block active channels if the backend is blockedChristian Kellner2011-06-061-0/+16
| | | | Let the GVfsChannel pick up the blocked state from the backend.
* Fix threadsafety of closing channelsAlexander Larsson2011-04-151-30/+18
| | | | | | | | | | | There is a race in g_vfs_job_close_read_finalize vs command_read_cb where if these run in different threads (the command_read_cb in the main thread and the close in another thread), such as in the smb case then we may free the channel early. We fix this by having the command reading propely ref the channel and add a cancellable that allows us to cancel the command reading when the channel is closed.
* Bug 587484 – Interaction when unmounting mounts and misc fixesDavid Zeuthen2009-07-081-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Bug 535814 – hangup on g_input_stream_close after cancelling from otherAlexander Larsson2009-03-061-7/+2
| | | | | | | | | | | | | 2009-03-06 Alexander Larsson <alexl@redhat.com> Bug 535814 – hangup on g_input_stream_close after cancelling from other thread * daemon/gvfschannel.c: Reverted patch from bug 522192 as it caused bug 535814. Furthermore, its just wrong. We don't cancel streams as such, we cancel individual operations on the stream. svn path=/trunk/; revision=2296
* Add (de)marshalling functions for GFileInfos.Alexander Larsson2009-02-271-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-02-27 Alexander Larsson <alexl@redhat.com> * common/Makefile.am: * common/gvfsfileinfo.[ch]: Add (de)marshalling functions for GFileInfos. * common/gvfsdaemonprotocol.h: Add protocol extensions for query info over streams * client/gdaemonfileinputstream.c: Support sync query_info. * daemon/Makefile.am: * daemon/gvfsjobqueryinforead.[ch]: * daemon/gvfsbackend.h: Added query info job and backend call for input streams * daemon/gvfsbackendtest.c: Implement query_info_on_read * daemon/gvfschannel.[ch]: Add g_vfs_channel_send_info * daemon/gvfsreadchannel.c: (read_channel_handle_request): Handle query info * test/Makefile.am: * test/test-query-info-stream.c: Add test for stream query info. svn path=/trunk/; revision=2257
* Do not create new read/write jobs if the gvfschannel has been cancelled.Carlos Garcia Campos2008-03-251-2/+7
| | | | | | | | | | 2008-03-25 Carlos Garcia Campos <carlosgc@gnome.org> * daemon/gvfschannel.c: (got_request), (send_reply_cb): Do not create new read/write jobs if the gvfschannel has been cancelled. Fixes a crash in sftp backend (#522192). svn path=/trunk/; revision=1679
* Code cleanup from Kjartan: Removes unused code/variables. Uses rightAlexander Larsson2008-02-191-1/+0
| | | | | | | | | | | | | | | 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
* Fix case where current_job has died (NULL) but the current_job_seq_nr wasAlexander Larsson2008-02-141-1/+2
| | | | | | | | | | | | | 2008-02-14 Alexander Larsson <alexl@redhat.com> * daemon/gvfschannel.c: Fix case where current_job has died (NULL) but the current_job_seq_nr was left and matched a sent cancel op. (#515959) svn path=/trunk/; revision=1271
* Init seq_nr to 1 so that seq_nr 0 is special (used for e.g. readahead ops)Alexander Larsson2008-02-041-36/+119
| | | | | | | | | | | | | | | | 2008-02-04 Alexander Larsson <alexl@redhat.com> * client/gdaemonfileinputstream.c: * client/gdaemonfileoutputstream.c: Init seq_nr to 1 so that seq_nr 0 is special (used for e.g. readahead ops) * daemon/gvfschannel.[ch]: * daemon/gvfsreadchannel.c: Implement readahead. svn path=/trunk/; revision=1221
* Update to build with the latest glib included gioAlexander Larsson2007-11-271-4/+4
| | | | | | | | | | | | | | | | | | | | | 2007-11-27 Alexander Larsson <alexl@redhat.com> * client/gdaemonfileinputstream.c: * client/gdaemonfileoutputstream.c: * client/gdaemonvfs.c: * client/gvfsfusedaemon.c: * client/gvfsuriutils.h: * daemon/gvfsbackend.c: * daemon/gvfsbackendsftp.c: * daemon/gvfsbackendtrash.c: * daemon/gvfschannel.c: * daemon/gvfsmonitor.c: * daemon/mount.c: Update to build with the latest glib included gio svn path=/trunk/; revision=1034
* Add required includes for solaris Patch from Damien CarberyAlexander Larsson2007-11-131-0/+1
| | | | | | | | | | | | | | | | 2007-11-13 Alexander Larsson <alexl@redhat.com> * common/gsysutils.c: * daemon/gvfschannel.c: * daemon/gvfsdaemonutils.c: * daemon/gvfsjobcopy.c: * daemon/gvfsmonitor.c: * daemon/gvfswritechannel.c: Add required includes for solaris Patch from Damien Carbery svn path=/trunk/; revision=1022
* 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
* Update to API changes in gio.Sebastian Dröge2007-10-021-1/+0
| | | | | | | | | | | | | | | * client/gdaemonfile.c: (g_daemon_file_append_to), (g_daemon_file_create), (g_daemon_file_replace): * test/benchmark-gvfs-big-files.c: (create_file): * test/benchmark-gvfs-small-files.c: (create_file): Update to API changes in gio. * daemon/gvfschannel.c: * daemon/gvfsreadchannel.c: * daemon/gvfswritechannel.c: * daemon/main.c: Drop unecessary includes. svn path=/trunk/; revision=966
* Make data arg constAlexander Larsson2007-09-131-2/+2
| | | | | | Original git commit by Alexander Larsson <alexl@redhat.com> at 1185358008 +0200 svn path=/trunk/; revision=706
* Convert GOutputStream to the new async API modelAlexander Larsson2007-09-131-19/+16
| | | | | | Original git commit by Alexander Larsson <alexl@redhat.com> at 1177604422 +0200 svn path=/trunk/; revision=484
* Convert g_input_stream_read_async to the new async API modelAlexander Larsson2007-09-131-39/+29
| | | | | | Original git commit by Alexander Larsson <alexl@redhat.com> at 1177583019 +0200 svn path=/trunk/; revision=481
* GOutputStreamSocket -> GSocketOutputStreamAlexander Larsson2007-09-131-2/+2
| | | | | | Original git commit by Alexander Larsson <alex@greebo.(none)> at 1173785092 +0100 svn path=/trunk/; revision=386
* GInputStreamSocket -> GSocketInputStreamAlexander Larsson2007-09-131-2/+2
| | | | | | Original git commit by Alexander Larsson <alex@greebo.(none)> at 1173784797 +0100 svn path=/trunk/; revision=385
* s/G_IS_VFS/G_VFS_IS/gAlexander Larsson2007-09-131-2/+2
| | | | | | Original git commit by Alexander Larsson <alex@greebo.(none)> at 1172074189 +0100 svn path=/trunk/; revision=378
* Handle WRITE_CLOSE specially tooAlexander Larsson2007-09-131-9/+5
| | | | | | Original git commit by Alexander Larsson <alex@greebo.(none)> at 1172069748 +0100 svn path=/trunk/; revision=371
* Initial work for daemon side write supportAlexander Larsson2007-09-131-5/+6
| | | | | | Original git commit by Alexander Larsson <alex@greebo.(none)> at 1171642429 +0100 svn path=/trunk/; revision=359
* G_TYPE_VFS_xxx -> G_VFS_TYPE_xxxAlexander Larsson2007-09-131-3/+3
| | | | | | 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-0/+610
Original git commit by Alexander Larsson <alex@greebo.(none)> at 1171634935 +0100 svn path=/trunk/; revision=354