summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* common: Fix possible crash with blank disksBastien Nocera2015-06-161-0/+8
| | | | | | Never call bd_open() with an empty path. https://bugzilla.gnome.org/show_bug.cgi?id=749093
* client: Suppress errors if daemon part is missingOndrej Holy2015-06-081-1/+1
| | | | | | | | | | | | We want to split gvfs package on client and daemon part due to app sandboxing. Return FALSE from vfs_is_active if there aren't any supported uri schemes (i.e. deamon part is missing). It will cause things to work just like if the gvfs client part was never installed. Replace some warnings/errors by g_debug to suppress errors when registering gio modules and daemon part is missing. https://bugzilla.gnome.org/show_bug.cgi?id=750401
* build: Remove libbluray dependencyOndrej Holy2015-05-291-2/+1
| | | | | | Commit 6cbe00d removed gvfsmountinfo.c from common shared library, however libbluray dependency wasn't removed. Remove the dependency by this patch.
* Fix build error when using HAL backendTing-Wei Lan2015-04-023-0/+590
| | | | | | gvfsdbusutils.[ch] are renamed to gvfshalutils.[ch] to prevent confusion. https://bugzilla.gnome.org/show_bug.cgi?id=722411
* dnssd: Run GSimpleAsyncResult completion in idleRoss Lagerwall2015-03-141-4/+4
| | | | | | | | | | | | g_simple_async_result_complete should only be used from the thread on which the callback should be invoked. Also, the gvfs job threads do not have their own GMainContexts which causes an assertion failure [1] when invoking g_simple_async_result_complete. Instead, use g_simple_async_result_complete_in_idle(). [1] (process:11772): GLib-CRITICAL **: g_main_context_push_thread_default: assertion 'acquired_context' failed https://bugzilla.gnome.org/show_bug.cgi?id=629345
* dnssd: Remove recursive main loopRoss Lagerwall2015-03-141-15/+16
| | | | | | | Don't run a recursive main loop on a separate thread with a shared GMainContext. https://bugzilla.gnome.org/show_bug.cgi?id=629345
* dnssd: Prevent crash when resolving serviceRoss Lagerwall2015-03-141-39/+19
| | | | | | | | | | | | | | | AvahiClient appears to require that avahi_service_resolver_new is invoked from the same thread to which its poll function is bound otherwise it can crash with a callback running while avahi_service_resolver_new is still busy. To fix this, always run avahi_service_resolver_new from the main loop. To simplify the code, any errors from the function are ignored for now. This crash could be reproduced 100% of the time by trying to mount dav+sd (via gnome-user-share) in a single-CPU VM. https://bugzilla.gnome.org/show_bug.cgi?id=629345
* common: Increase mount timeout to 30 minutesRoss Lagerwall2015-03-112-6/+7
| | | | | | | | | Although it is probably unnecessary, wait up to 30 minutes for a mount to complete. This allows plenty of time to wait for a password dialog. It also makes it more consistent with many of the other operations which use a timeout of 30 minutes. https://bugzilla.gnome.org/show_bug.cgi?id=594500
* daemon: Move random string generation into shared libRoss Lagerwall2015-02-093-0/+73
| | | | | | | Random string generation is used in a few different places, so share the implementation. https://bugzilla.gnome.org/show_bug.cgi?id=738967
* common: Fix a warningRoss Lagerwall2015-01-261-1/+0
|
* ProxyVolumeMonitor: Load list of installed remote monitors via dbusAlexander Larsson2015-01-262-2/+3
| | | | | | We used to just load the files from this, but that does not work in a sandboxed environment. For backwards compat we keep loading the old files if the dbus api is not implemented yet.
* Move proxy monitor implementation listing to commonAlexander Larsson2015-01-263-0/+254
| | | | | | | | Also add some to/from_dbus helpers. This is in preparation for moving the reading of the monitor files to the gvfs daemon, which is needed for the sandboxed case where the monitor files are not necessarily the same as the host installed ones.
* Build shared code for gphoto2 and mtp as a convenience libRoss Lagerwall2014-10-133-0/+186
| | | | | | | | Deduplicate code between gphoto2 and mtp by creating a convenience library call libgvfscommon-gphoto2 which is only built if either libmtp is used or gphoto2 with gudev is used. https://bugzilla.gnome.org/show_bug.cgi?id=736285
* common: use nl_langinfo constants conditionallyOndrej Holy2014-03-271-1/+5
| | | | | | The _NL_ADDRESS_LANG_TERM and _NL_ADDRESS_COUNTRY_AB3 aren't portable. https://bugzilla.gnome.org/show_bug.cgi?id=726707
* Remove obsolete address info for the LGPLRoss Lagerwall2014-01-231-3/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=721510
* client: remove GVfsUriMountInfoGiovanni Campagna2014-01-202-9/+33
| | | | | | | | | This structure is too similar to GMountSpec to deserve a presence (it's essentially a GMountSpec with a path). By removing it we can remove some code and avoid wasteful allocations in sensitive paths such as creating and traversing GFiles. https://bugzilla.gnome.org/show_bug.cgi?id=721461
* build: replace obsolete INCLUDES by CPPFLAGSOndrej Holy2014-01-171-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=722354
* Convert libgvfscommon to a private shared libraryRoss Lagerwall2013-12-121-2/+2
| | | | | | | Convert libgvfscommon to a private shared library since it is not used by anything outside of the libdir. Also, don't version it. https://bugzilla.gnome.org/show_bug.cgi?id=561187
* Implement truncate support for output streamsRoss Lagerwall2013-12-052-0/+18
| | | | | | | | | | | | | | | | | | | | | Backends receive a TRUNCATE message which contains a size parameter. Truncation is signaled with a TRUNCATED message (which contains no other useful information). In more detail: Add a new dbus method, OpenForWriteFlags, which has a flags parameter to implement can_seek and can_truncate. These flags are used in GDaemonFileOutputStream. Compatability with old clients is maintained. Implement the can_truncate and truncate_fn GDaemonFileOutputStream methods. Add two new message types to the daemon socket protocol: G_VFS_DAEMON_SOCKET_PROTOCOL_REQUEST_TRUNCATE G_VFS_DAEMON_SOCKET_PROTOCOL_REPLY_TRUNCATED Add a new job type, GVfsJobTruncate. Add two new methods to GVfsBackend which backend classes can implement: truncate and try_truncate https://bugzilla.gnome.org/show_bug.cgi?id=573837
* common: Make autorun.inf parsing less stricttimeless2013-11-011-1/+1
| | | | | | | | | | Make the parsing of autorun.inf less strict by ignoring whitespace around "=". Tweaked by Ross Lagerwall to prevent a match occurring if the part after the "=" contains only whitespace. https://bugzilla.gnome.org/show_bug.cgi?id=595027
* GVfsIcon: support icon serialisationRyan Lortie2013-04-212-0/+37
| | | | | | | Add support for the new icon serialisation interface to GVfsIcon as well as implementing the new interface on GVfsClass for deserialising. https://bugzilla.gnome.org/show_bug.cgi?id=688820
* Fix compiler warningsBastien Nocera2013-04-021-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=695834
* Use g_list_free_full() where applicableTomas Bzatek2013-01-172-5/+2
|
* Fix use of uninitialized valuesTomas Bzatek2012-12-072-3/+12
|
* Capitalize acronymscjl2012-11-021-3/+3
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=683763 Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
* gmountsource: Always use NULL-terminated arraysTomas Bzatek2012-09-042-12/+0
| | | | | | | | | | | | | | | GDBus calls require NULL-terminated string arrays, let's use them internally instead of array + n_elements couple. Also fix all users of g_mount_source_ask_question() and g_mount_source_show_processes(). This is a regression after gdbus port actually, the old code used to deal with string arrays differently. Related commit: 99d06e499f999459f1fc973c870415a004722d54 https://bugzilla.gnome.org/show_bug.cgi?id=683118
* Add support for getting symbolic iconsWilliam Jon McCann2012-08-303-6/+25
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=681458
* gmountspec: Make sure to free the GVariantIterJasper St. Pierre2012-08-251-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=682646
* Report back error_code on spawn fail due to bus name already ownedAlexander Larsson2012-08-231-0/+1
| | | | | | We return the not-quite-right ALREADY_MOUNTED. Its not strictly right because just because the name is owned does not mean the mount has been registred yet.
* Make the dnssd code non-sharedAlexander Larsson2012-08-211-1/+1
| | | | | | This code is tiny, and only used by two backends. Having this code in a separate .so is likely a negative gain in both size and speed.
* Remove unused code from client libsAlexander Larsson2012-08-211-1/+14
| | | | | | | | The gvfsmountinfo.c (and its libbluray dependency) is unused by the client code, so we remove it from the common shared lib. We use a non-shared lib for this, as in practice only one of the monitors that use this code will be build/installed/used.
* Remove unused gsysutils filesAlexander Larsson2012-08-213-221/+0
|
* Remove final parts of libdbusAlexander Larsson2012-08-213-1430/+2
| | | | Don't link to libdbus and remove libdbus utility functions.
* mount-op: adapt to guint64->gint64 API changeCosimo Cecchi2012-08-214-10/+10
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=682284
* gdbus: Remove debug printsTomas Bzatek2012-07-312-18/+0
|
* gdbus: More errors to stripTomas Bzatek2012-07-311-0/+3
|
* gdbus: Rename common d-bus interface xml fileTomas Bzatek2012-07-312-3/+3
|
* gdbus: Code style fixesTomas Bzatek2012-07-311-32/+16
|
* gdbus: Fix case of GDbusAttributeValue structTomas Bzatek2012-07-312-8/+8
|
* gdbus: Use casting macros where possibleTomas Bzatek2012-07-312-6/+6
|
* gdbus: Use g_clear_object() where appropriateTomas Bzatek2012-07-311-7/+3
|
* gdbus: Properly suffix functions doing sync proxy creationTomas Bzatek2012-07-312-10/+11
| | | | ...so that they are recognizable on a first sight.
* gdbus: Reword GVariant argumentsTomas Bzatek2012-07-318-42/+42
| | | | and kill the iters.
* gdbus: gmountoperationdbus.c: Move referenced objects aroundTomas Bzatek2012-07-311-24/+26
| | | | | Reorganize saved references for used objects, getting rid of some FIXMEs.
* gdbus: Construct proxies without connecting signals and propertiesTomas Bzatek2012-07-312-2/+2
| | | | | Use G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS and G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flags where applicable.
* gdbus: Use G_VARIANT_TYPE_HANDLE for fd_id argumentsTomas Bzatek2012-07-311-3/+3
|
* gdbus: Move annotations to the interface XML fileTomas Bzatek2012-07-312-6/+3
|
* gdbus: Fix srcdir != builddir and make the build more quietTomas Bzatek2012-07-311-2/+2
|
* gdbus: Fixup d-bus interface naming styleTomas Bzatek2012-07-311-18/+18
| | | | And conform to usual GNOME naming conventions.
* gdbus: Treat empty non-NULL strings for the "ay" type as NULLTomas Bzatek2012-07-312-1/+8
| | | | | | | | | | A fallout of port away from convenient G_DBUS_TYPE_CSTRING type and _g_dbus_message_append_args() + _g_dbus_message_iter_get_args() functions that masked NULL strings as non-NULL empty strings ("") for transferring over d-bus and on the other side reconstructed the original value. Portions of other code treat non-NULL strings differently even if they were empty. This fixes e.g. opening http URLs via gvfs-open.