summaryrefslogtreecommitdiff
path: root/client/gvfsdaemondbus.c
Commit message (Collapse)AuthorAgeFilesLines
* client: Use the correct serial with file transfer cancellationRoss Lagerwall2014-11-181-4/+9
| | | | | | | | | When using Copy, Move, Push and Pull with progress callbacks, the progress callbacks increment the connection serial, so retrieve the serial immediately after the dbus method call so that the correct serial is used for cancellation. https://bugzilla.gnome.org/show_bug.cgi?id=720058
* GDaemonMount: invalidate mount cache whenever we unmount a mountSimon McVittie2014-07-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Otherwise, the old mount info, and in particular the (D-Bus unique name, object path) pair representing it in its backend, will remain in the cache until the backend process exits, which could take time. Re-mounting and re-unmounting that mount would fail, because the second Unmount() call would go to the unique name and object path of the backend object that was destroyed by the first Unmount call, not the backend object that is now responsible. I'm using the Unmount reply rather than a signal, for thread-safety; the mount cache is global, so if it was listening for the Unmounted signal, that signal would be queued up for delivery to some specific main-context, call it A. If another thread did the umount/mount/unmount in main context B, before main context A was dispatched, then the invalidation would be too late to help it. This does not cover concurrent mount/unmount in two distinct main contexts without any synchronization. However, if two threads in main contexts B and C race to mount/unmount a share, then they're sometimes going to lose anyway, and there isn't a great deal that cache invalidation can do to help them.
* client: Use the correct enumeration constantRoss Lagerwall2013-11-301-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=712382
* gdbus: fix compilation warningsOndrej Holy2013-09-261-4/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=591228#c21
* client: Remove unused code for dbus vfs filtersAlexander Larsson2013-09-261-104/+0
| | | | | | This code is not used anymore https://bugzilla.gnome.org/show_bug.cgi?id=708744
* Fix some memory leaksWilliam Jon McCann2012-09-111-5/+13
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=683770
* Remove unused gsysutils filesAlexander Larsson2012-08-211-1/+0
|
* gdbus: Remove debug printsTomas Bzatek2012-07-311-25/+1
|
* gdbus: Strip unknown GError quark stringsTomas Bzatek2012-07-311-0/+15
| | | | | | This hopefully covers all public methods. Seems like this fixes several memleaks as well.
* gdbus: Use casting macros where possibleTomas Bzatek2012-07-311-2/+2
|
* gdbus: Use g_clear_error() where appropriateTomas Bzatek2012-07-311-2/+1
|
* gdbus: Use g_clear_object() where appropriateTomas Bzatek2012-07-311-6/+3
|
* gdbus: Remove unused extra_fd stuffTomas Bzatek2012-07-311-58/+8
|
* gdbus: Make cancellation workTomas Bzatek2012-07-311-0/+125
| | | | | | This mimics the old behaviour and works for sync and async. Requires new glib for g_dbus_connection_get_last_serial().
* gdbus: Remove unused includeTomas Bzatek2012-07-311-1/+0
| | | | So that nothing depends on gvfsdbusutils.h, which is full of old libdbus code.
* gdbus: Core daemon and client portTomas Bzatek2012-07-311-633/+252
| | | | | | | | | | | 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>
* Adapt to GLib 2.31 deprecations and thread API changesMatthias Clasen2011-10-211-6/+9
| | | | | | | GStaticMutex and GStaticRWLock have been replaced by GMutex and GRWLock, and g_thread_init() is no longer needed. https://bugzilla.gnome.org/show_bug.cgi?id=661148
* client: Don't leak the GCancellable's fd in case of an g_poll errorChristian Kellner2011-05-251-0/+1
|
* client: Handle error events when polling _g_vfs_daemon_call_sync ()Christian Kellner2011-05-251-0/+8
| | | | Check for G_IO_NVAL, G_IO_ERR and G_IO_HUP when we (succesfully) returned from g_poll since we get into a infinite loop later otherwise.
* client: Fix wrong assignment before dbus_connection_unref()Jonathan Blanchard2011-03-161-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=627881
* Fix return value of async_connection_accept_new_fd()Henry Hoegelow2010-12-071-2/+4
| | | | | | | | | | | | | async_connection_accept_new_fd() is a GSource callback and needs to return TRUE so that it is called again. Add the missing return value. Fixes gvfs client code on the ARM platform (and probably other platforms too). See https://bugzilla.gnome.org/show_bug.cgi?id=633330 for further details. Acked-by: Sven Neumann <sven@gimp.org>
* 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
* Implement support for g_cancellable_release_fd()Benjamin Otte2009-08-191-0/+1
| | | | | | | See bug 591388 and documentation for g_cancellable_release_fd() for a rationale. This fix requires glib git master.
* try extra hard to make sure operations get cancelled properlyBenjamin Otte2009-06-251-0/+25
| | | | | | | | | Previously there were some rather big windows that allowed for races between cancelling and calling g_simple_async_result_complete(). This code makes sure we check for cancellaton right before calling g_simple_async_result_complete(), which gets rid of that window and gives you the guarantee that cancelling an operation in the main thread will indeed return a CANCELLED error.
* Bug 585591 – Starting/stopping drivesDavid Zeuthen2009-06-171-6/+9
| | | | | | | | | This is the GVfs implementation for the new GIO API for starting/stopping drives. See http://bugzilla.gnome.org/show_bug.cgi?id=585591 for details.
* Bug 563623 – build dies on platforms lacking poll() implimentationAlexander Larsson2009-02-181-6/+5
| | | | | | | | | | | | | | | 2009-02-18 Alexander Larsson <alexl@redhat.com> Bug 563623 – build dies on platforms lacking poll() implimentation * client/gvfsdaemondbus.c: (setup_async_fd_receive): (_g_vfs_daemon_call_sync): Use g_poll instead of poll. Patch from ephraim_owns@hotmail.com svn path=/trunk/; revision=2234
* Use g_set_error_literal where appropriate. Bug #539167.Christian Persch2008-08-021-5/+5
| | | | svn path=/trunk/; revision=1847
* In call_sync, on stale cache errors due to a mount daemon disappearing,Alexander Larsson2008-03-311-19/+72
| | | | | | | | | | | | | | | | | 2008-03-31 Alexander Larsson <alexl@redhat.com> * client/gvfsdaemondbus.[ch]: In call_sync, on stale cache errors due to a mount daemon disappearing, invalidate caches and return G_VFS_ERROR_RETRY so that the caller can retry with fresh caches. * client/gdaemonfile.c: Retry calls on G_VFS_ERROR_RETRY. svn path=/trunk/; revision=1704
* Only use <gio/gio.h> includeAlexander Larsson2007-12-141-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-12-14 Alexander Larsson <alexl@redhat.com> * client/gdaemondirectorymonitor.c: * client/gdaemondirectorymonitor.h: * client/gdaemonfile.c: * client/gdaemonfile.h: * client/gdaemonfileenumerator.c: * client/gdaemonfileenumerator.h: * client/gdaemonfileinputstream.c: * client/gdaemonfileinputstream.h: * client/gdaemonfilemonitor.c: * client/gdaemonfilemonitor.h: * client/gdaemonfileoutputstream.c: * client/gdaemonfileoutputstream.h: * client/gdaemonmount.c: * client/gdaemonmount.h: * client/gdaemonvfs.c: * client/gdaemonvfs.h: * client/gdaemonvolumemonitor.h: * client/gvfsdaemondbus.c: * client/gvfsdaemondbus.h: * client/gvfsfusedaemon.c: * client/gvfsurimapper.h: * client/smburi.c: * common/gdbusutils.c: * common/gdbusutils.h: * common/gmountoperationdbus.c: * common/gmountoperationdbus.h: * common/gmountsource.c: * common/gmountsource.h: * common/gsysutils.c: * common/gvfsdaemonprotocol.c: * common/gvfsdaemonprotocol.h: * daemon/gvfsbackend.h: * daemon/gvfsbackendftp.c: * daemon/gvfsbackendsftp.c: * daemon/gvfsbackendsmb.c: * daemon/gvfsbackendsmbbrowse.c: * daemon/gvfsbackendtest.c: * daemon/gvfsbackendtrash.c: * daemon/gvfsdaemonutils.c: * daemon/gvfsjob.c: * daemon/gvfsjob.h: * daemon/gvfsjobcopy.h: * daemon/gvfsjobcreatemonitor.h: * daemon/gvfsjobdelete.h: * daemon/gvfsjobenumerate.h: * daemon/gvfsjobmakedirectory.h: * daemon/gvfsjobmakesymlink.h: * daemon/gvfsjobmount.h: * daemon/gvfsjobmountmountable.h: * daemon/gvfsjobmove.h: * daemon/gvfsjobqueryattributes.h: * daemon/gvfsjobqueryfsinfo.h: * daemon/gvfsjobqueryinfo.h: * daemon/gvfsjobsetattribute.h: * daemon/gvfsjobsetdisplayname.h: * daemon/gvfsjobtrash.h: * daemon/gvfsjobunmount.h: * daemon/gvfsmonitor.h: * daemon/mount.c: * daemon/mount.h: * programs/gvfs-cat.c: * programs/gvfs-copy.c: * programs/gvfs-info.c: * programs/gvfs-ls.c: * programs/gvfs-monitor-dir.c: * programs/gvfs-monitor-file.c: * programs/gvfs-mount.c: * programs/gvfs-move.c: * programs/gvfs-rm.c: * programs/gvfs-save.c: * programs/gvfs-trash.c: * test/benchmark-gvfs-big-files.c: * test/benchmark-gvfs-small-files.c: * test/benchmark-posix-big-files.c: * test/benchmark-posix-small-files.c: Only use <gio/gio.h> include svn path=/trunk/; revision=1039
* Make sure we somewhat cleanly handle the various dbus daemons going down.Alexander Larsson2007-11-141-9/+56
| | | | | | | | | | | | | | | | | | | | | | | 2007-11-14 Alexander Larsson <alexl@redhat.com> * client/gdaemonvfs.[ch]: * client/gvfsdaemondbus.c: Make sure we somewhat cleanly handle the various dbus daemons going down. By somewhat I mean that no problem should be persistant even if you might get some transient error messages. Unfortunately the only way to be able to cleanly handle this involves globally ignoring SIGPIPE. What can I say, unix sucks. * common/gsysutils.c: (_g_socket_receive_fd): Handle errors if e.g. the fd is closed svn path=/trunk/; revision=1023
* 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
* Add defines for monitoringAlexander Larsson2007-10-081-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-10-08 Alexander Larsson <alexl@redhat.com> * common/gvfsdaemonprotocol.h: Add defines for monitoring * client/Makefile.am: * client/gdaemondirectorymonitor.[ch]: * client/gdaemonfilemonitor.[ch]: * client/gdaemonfile.c: Add daemon directory monitor and initial work on file monitor * client/gdaemonfileenumerator.c: Make path_counter private Return DBUS_HANDLER_RESULT_HANDLED when handling messages. * client/gdaemonvfs.[ch]: Make _g_mount_ref_ref "public" * client/gvfsdaemondbus.c: Handle NULL callbacks for async calls * daemon/Makefile.am: * daemon/gvfsbackend.[ch]: * daemon/gvfsjobcreatemonitor.[ch]: Add create_dir_monitor and create_file_monitor. Add g_vfs_backend_get_daemon * daemon/gvfsmonitor.[ch]: Helper code for monitors * daemon/gvfsbackendtrash.c: Implement directory monitor for trash dirs svn path=/trunk/; revision=971
* Clear VfsConnectionData on creation (fixes read of uninitialized data onAlexander Larsson2007-09-251-1/+1
| | | | | | | | | | | | | | 2007-09-25 Alexander Larsson <alexl@redhat.com> * client/gvfsdaemondbus.c: Clear VfsConnectionData on creation (fixes read of uninitialized data on thread shutdown) * daemon/sftp.mount.in: Correct the type to "sftp" svn path=/trunk/; revision=962
* Pass in DBusConnection to use instead of using default oneAlexander Larsson2007-09-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | 2007-09-25 Alexander Larsson <alexl@redhat.com> * common/gmountoperationdbus.[ch]: * common/gmounttracker.[ch]: Pass in DBusConnection to use instead of using default one * client/gdaemonfile.c: * client/gdaemonvfs.[ch]: * client/gvfsdaemondbus.c: Use private dbus connection even for async calls, since the mainloop integration is conflicting with dbus-glib. This is a temporary measure until this is solved in a better way. * client/gdaemonvolumemonitor.c: * client/gvfsfusedaemon.c: * daemon/gvfsbackendsmbbrowse.c: Update to the API changes svn path=/trunk/; revision=959
* Use g_cancellable_set_error_if_cancelledAlexander Larsson2007-09-131-21/+5
| | | | | | Original git commit by Alexander Larsson <alexl@redhat.com> at 1188212811 +0200 svn path=/trunk/; revision=809
* Move FileInfo marshalling to common/.Alexander Larsson2007-09-131-146/+0
| | | | | | | | | | | Split up FileInfo marshalling so attributes can be marshalled independently. Rename some protocol utilities to private namespace. Implement SetAttribute operation marshaling. Correct some trivial typos. Original git commit by Hans Petter Jansson <hpj@cl.no> at 1183630369 +0200 svn path=/trunk/; revision=640
* Add copy in daemon, and support for callbacks in daemon protocolAlexander Larsson2007-09-131-8/+27
| | | | | | Original git commit by Alexander Larsson <alexl@redhat.com> at 1183547547 +0200 svn path=/trunk/; revision=622
* demarshal icons in file attributesAlexander Larsson2007-09-131-1/+52
| | | | | | Original git commit by Alexander Larsson <alexl@redhat.com> at 1183394153 +0200 svn path=/trunk/; revision=601
* Centralize dbus timeout default valueAlexander Larsson2007-09-131-7/+8
| | | | | | Original git commit by Alexander Larsson <alexl@redhat.com> at 1178634120 +0200 svn path=/trunk/; revision=527
* Move from G_FILE_ERROR to G_IO_ERRORAlexander Larsson2007-09-131-10/+10
| | | | | | Original git commit by Alexander Larsson <alex@greebo.(none)> at 1174386485 +0100 svn path=/trunk/; revision=407
* Rename G_VFS_ERROR to G_IO_ERRORAlexander Larsson2007-09-131-7/+7
| | | | | | Original git commit by Alexander Larsson <alex@greebo.(none)> at 1174383743 +0100 svn path=/trunk/; revision=405
* Make GFileInfo into a pure key => value+type mapping.Alexander Larsson2007-09-131-166/+62
| | | | | | | | | Remove GFileInfoRequestFlags Add GFileGetInfoFlags and move FOLLOW_SYMLINKS to it Original git commit by Alexander Larsson <alex@greebo.(none)> at 1173704989 +0100 svn path=/trunk/; revision=379
* Use _g_dbus_connection_call_async helper in some placesAlexander Larsson2007-09-131-75/+25
| | | | | | Original git commit by Alexander Larsson <alex@greebo.(none)> at 1171298342 +0100 svn path=/trunk/; revision=332
* Use dbus_connection_get_unix_fd instead of dbus_connection_get_socket as the ↵Alexander Larsson2007-09-131-1/+1
| | | | | | | | later is not availible on all dbus versions Original git commit by Alexander Larsson <alex@greebo.(none)> at 1171295051 +0100 svn path=/trunk/; revision=328
* Use _g_error_from_message when possibleAlexander Larsson2007-09-131-18/+6
| | | | | | Original git commit by Alexander Larsson <alex@greebo.(none)> at 1171294860 +0100 svn path=/trunk/; revision=326
* Clean up code a bitAlexander Larsson2007-09-131-3/+15
| | | | | | Original git commit by Alexander Larsson <alex@greebo.(none)> at 1170168588 +0100 svn path=/trunk/; revision=286
* Clean up _g_vfs_daemon_call_asyncAlexander Larsson2007-09-131-10/+0
| | | | | | Original git commit by Alexander Larsson <alex@greebo.(none)> at 1170167354 +0100 svn path=/trunk/; revision=285
* Initial work on new mount model for async callsAlexander Larsson2007-09-131-49/+6
| | | | | | Original git commit by Alexander Larsson <alex@greebo.(none)> at 1170158798 +0100 svn path=/trunk/; revision=279
* Initial client side work for new mount trackerAlexander Larsson2007-09-131-277/+62
| | | | | | Original git commit by Alexander Larsson <alex@greebo.(none)> at 1170091175 +0100 svn path=/trunk/; revision=277