summaryrefslogtreecommitdiff
path: root/gdbus
Commit message (Collapse)AuthorAgeFilesLines
* gdbus: Unref cached GDBusConnection objects when the connection is closedAndre Moreira Magalhaes2019-08-074-57/+174
| | | | | | | | | | | | | | | | | This change fixes the dbus-leak tests by dropping the cached GDBusConnection objects references when the bus connection is closed. The issue was introduced with recent changes made to GLib[1] where invoking g_test_dbus_down() will fail after a timeout if the GDBusConnection object for the session bus leaks. Given g_test_dbus_down() will first close the connection before checking for leaks unreffing the object when the connection is closed should fix the issue. [1] https://gitlab.gnome.org/GNOME/glib/merge_requests/963 Signed-off-by: Andre Moreira Magalhaes <andre@endlessm.com>
* gdbus/thread: Always copy GError on gettersAndre Moreira Magalhaes2019-07-241-13/+9
| | | | | | | | | | | | | This change should guarantee that the object is valid while in use. The change is part of a series of changes to fix an issue introduced with recent changes made to GLib[1] where invoking g_test_dbus_down() will fail after a timeout if the GDBusConnection object for the session bus leaks. [1] https://gitlab.gnome.org/GNOME/glib/merge_requests/963 Signed-off-by: Andre Moreira Magalhaes <andre@endlessm.com>
* gdbus/thread: Always ref GDBusConnection on gettersAndre Moreira Magalhaes2019-07-241-4/+5
| | | | | | | | | | | | | This change should guarantee that the object is valid while in use. The change is part of a series of changes to fix an issue introduced with recent changes made to GLib[1] where invoking g_test_dbus_down() will fail after a timeout if the GDBusConnection object for the session bus leaks. [1] https://gitlab.gnome.org/GNOME/glib/merge_requests/963 Signed-off-by: Andre Moreira Magalhaes <andre@endlessm.com>
* build: Enable G_LOG_USE_STRUCTURED=1Philip Withnall2018-08-161-4/+2
| | | | | | | This enables structured logging for all parts of dconf, which will make it easier to check for certain log messages in the unit tests. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* dconf_gdbus_get_worker_context(): improve GObject deadlock workaroundOwen W. Taylor2018-08-131-1/+20
| | | | | | | | The existing workaround for https://bugzilla.gnome.org/show_bug.cgi?id=674885 doesn't go far enough, and deadlocks can occur, for example, with the GSocket type. Extend the workaround logic to all the types from glib/gio/gdbusprivate.c:ensure_required_types().
* build: Add trailing commas where necessaryIñigo Martínez2018-08-111-4/+4
| | | | | | Having trailing commas in place means that if another source file or parameter is added to the end of the list or function, there won't be noise when adding the comma to the line above.
* build: Do not make heavy use of project_nameIñigo Martínez2018-08-111-9/+5
| | | | | | | | | The current meson build files make heavy use of meson's `project_name` function. However this makes difficult for any developer to find for given program/library/file names. The project name is also never going to change. Due to this reason these calls have been changed for `dconf` itself.
* build: Fix internal dependenciesIñigo Martínez2018-08-111-8/+18
| | | | | | | | | meson is able to generate internal dependencies for handling built libraries. These internal dependencies depend on other dependencies as well, based on the includes exposed by their headers. This have been fixed by using proper internal dependencies for these libraries.
* build: Avoid building libraries twiceIñigo Martínez2018-08-111-22/+2
| | | | | | | | | | | dconf builts a number of internal static libraries which in some cases are duplicated. This duplication comes from autotools that used to built two libraries for each library, one with PIC enabled and the other one without it. This has been changed to build only one library for each library to be built, except `libdconf-common-hidden` which hides some symbols for the GIO module to be built.
* Remove .gitignore filesIñigo Martínez2017-10-221-4/+0
| | | | | | | | | | meson does not allow to build source code inside the source code tree, for this reason there is no need for .gitignore files to ignore built files. This patch removes .gitignore files which are no longer needed. https://bugzilla.gnome.org/show_bug.cgi?id=784910
* build: Remove autotoolsIñigo Martínez2017-10-171-23/+0
| | | | | | | To avoid the burden of maintaining multiple build systems, this patch removes autotools support. https://bugzilla.gnome.org/show_bug.cgi?id=784910
* build: Port to meson build systemIñigo Martínez2017-10-172-0/+45
| | | | | | | | meson is a build system focused on speed an ease of use, which helps speeding up the software development. This patch adds meson support along autotools. https://bugzilla.gnome.org/show_bug.cgi?id=784910
* gdbus: Work around threading deadlock in glibColin Walters2016-11-181-0/+4
| | | | | | See https://bugzilla.gnome.org/show_bug.cgi?id=674885 for more details. What dconf is doing right now provokes this more easily by involving *another* thread in the mix.
* Updated FSF's addressDaniel Mustieles2014-01-311-3/+1
|
* gdbus backend: handle reply_type properlyRyan Lortie2013-11-251-1/+3
| | | | | | | | The test coverage report turned up some dead code in the engine as a result of the gdbus backend not properly checking the return type of D-Bus messages. Fix that up.
* Add missing "config.h" include everywhereRyan Lortie2013-11-241-0/+2
| | | | We ought to be including this from each .c file.
* Use G_LOG_DOMAIN in all library componentsRyan Lortie2013-02-211-2/+2
|
* Remove calls to g_type_init()Ryan Lortie2012-11-192-2/+0
| | | | Since we now have a hard dependency on the newer GLib anyway.
* GDBus thread backend: fix obscure race conditionRyan Lortie2012-07-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was possible for outgoing messages to be delivered in the wrong order due to an annoying race condition when dealing with delivery of "fast" change messages. This was hitting the in-order assertion on return of those messages. The race goes like this: - a write is requested from the main thread (1 in-flight, 0 pending) - the reply for this first change message comes back (but is not yet handled). - another write is requested from the main thread and immediately placed in-flight (with an idle on the worker thread for actually sending it). 2 in-flight, 0 pending. - a third write is requested from the main thread but goes to the pending queue (since the in-flight queue is full). 2 in-flight, 1 pending. - the reply for the first change message is now handled in the worker thread, removing the first change from the in-flight queue. The queue management sees the third write in the pending queue and promotes it to the in-flight queue (properly following the second write) but sends the message immediately since it's already in the worker thread (leapfrogging the second write which is still waiting in an idle). - the idle for the second write runs We solve this problem by dispatching all writes via idles, even if we're already in the worker thread.
* dbus test: add function to initialise for testingRyan Lortie2012-07-112-0/+16
| | | | | | | We were hardcoding g_type_init() in the D-Bus testcase because the GDBus backend depended on that happening. That is not true for the libdbus-1 backend, so split it out into a separate function implemeneted by the backend.
* massive Makefile reorganisationRyan Lortie2012-07-084-7/+25
| | | | | | | | | | Clean up the Makefiles and make them as similar as possible. Move CFLAGS to a common point of definition and stop using -I so much. Replace the 'dbus stub' with libdconf-mock.a in tests/. Fill in some stubs for future mock code for shm and gvdb (just to get things compiling for now).
* GDBus filter backend: plug a massive leakRyan Lortie2012-07-061-0/+2
| | | | Each async call was leaking the GDBusMesage. Be sure to free it.
* GDBus backends: sink parameters, even on failureRyan Lortie2012-07-062-3/+12
| | | | | The GDBus backends were not sinking the parameters for method calls on failure to acquire the bus.
* fix various 'make distcheck' issuesRyan Lortie2012-07-061-1/+1
|
* GDBus filter backend: fix reply-serial handlingRyan Lortie2012-07-061-27/+40
| | | | | The handling of the reply serial number in the filter-based GDBus backend (disabled by default) was incorrect. This fixes it.
* GDBus filter backend: return FALSE in error caseRyan Lortie2012-07-061-0/+2
| | | | We were setting the GError properly, but not actually returning FALSE.
* GDBus backend: only write to error if non-NULLRyan Lortie2012-07-061-1/+2
| | | | Convention says GError ** can be NULL, so we better check for that.
* .gitignore for common/, gdbus/ and engine/Ryan Lortie2012-07-061-0/+1
|
* add gtester supportRyan Lortie2012-07-061-0/+2
|
* Massively reorganise the client-sideRyan Lortie2012-07-023-0/+629
This commit represents a rather complete rethinking of DConfEngine. - the different kinds of sources are now properly abstracted. This will make landing NFS support substantially easier. - there is now substantially more internal documentation - DConfEngineMessage is gone and replaced with ordinary function calls to be implemented by the D-Bus glue code - the GDBus glue has been factored out and is now shared between the client library and GSettings - the "outstanding" queue logic from the GSettings backend is now in the engine - all changes now go through a single API that accepts a (new) DConfChangeset object. Currently this only supports the current operations (ie: setting and resetting). In the future this object will also support the directory operations required by GSettingsList and will be the basis for the new approach to implementing the 'delayed' GSettingsBackend (which will be the method by which those two concepts can co-exist). The (internal) API of the engine changed substantially. This caused the following: - the libdconf client library has been rewritten in C. Most of the complicated aspects of it (that made it more convenience to use Vala) are now gone. - during the rewrite of libdconf, the DConfClient API changed a bit to look more like a proper GObject. It now makes GIO-style use of thread-default main contexts and uses GObject signals for notifications (instead of hand-rolled callbacks). - the GSettings backend has been substantially simplified (the "outstanding" logic is gone). No externally-visible changes. - the dbus-1 backend has taken a copy of the old engine code for now until it can be ported to the new engine and sufficiently tested. No externally-visible changes. - the dconf commandline tool and dconf-editor required minor changes to adjust to the DConfClient API changes There is a substantial amount of cleaning up and finishing of work to be done. There are many stubs remaining. There are likely still a large number of bugs.