summaryrefslogtreecommitdiff
path: root/service
Commit message (Collapse)AuthorAgeFilesLines
* service: Don't hang during shutdownMarek Kasik2014-04-041-1/+6
| | | | | | | Remember whether a signal was signalled to dconf-service so we don't call g_application_release() more than once. https://bugzilla.gnome.org/show_bug.cgi?id=727549
* Updated FSF's addressDaniel Mustieles2014-01-3111-33/+11
|
* Add missing "config.h" include everywhereRyan Lortie2013-11-247-0/+14
| | | | We ought to be including this from each .c file.
* service: rewrite a line to avoid a gcc warningRyan Lortie2013-07-121-1/+2
| | | | gcc doesn't like 'a && b;' so use 'if (a) b;'.
* service: fix some harmless compile warningsRyan Lortie2013-07-124-7/+8
| | | | Mostly missing 'static'.
* service: fix a couple of leaksRyan Lortie2013-02-112-0/+2
| | | | | Fairly harmless leaks. One only happens in an error case (like the disk being full) and the other only happens on startup.
* writer: ignore empty changesetsRyan Lortie2013-02-111-7/+14
| | | | | | | | | | | | When emitting change signals, we call dconf_changeset_describe() to enumerate the keys to send the signal for. When the changeset is empty, this function returns NULL for the path vector. We pass that NULL into the signal emitter and the service crashes. We can avoid this situation by refusing to handle empty changesets in the first place.
* keyfile: explicitly use local GVfsRyan Lortie2013-01-121-1/+2
| | | | | | | | Avoid initialising all of GVfs for dconf-service in order to monitor a local file for changes. See https://bugzilla.gnome.org/show_bug.cgi?id=691618 for the possibility of a better fix.
* keyfile: implement list()Ryan Lortie2013-01-111-0/+21
|
* keyfile: add advisory lockingRyan Lortie2013-01-111-2/+62
| | | | | | | | | | | Use fcntl() on a lockfile when accessing a keyfile. Now reading the keyfile, notifying local processes of changes in it, applying changes from local request and rewriting it is all done under a single acquire of the lock. This effectively means that concurrent changes made to the database across several machines sharing a home directory over NFS will be seen by all machines as having occurred in the same order (decided by who won the race to the lock).
* keyfile: many improvementsRyan Lortie2013-01-112-13/+86
| | | | | | | | | | | | | Store the keyfile in ~/.config/dconf/$(name).txt instead of ~/.config/dconf-keyfile/name. Adjust the base writer not to pick up filenames with dots in them (so we will skip the .txt files the keyfile writer puts into the same directory). Add file change monitoring and reload the file if anyone changes it. Fix a crasher on the first write of a file if it does not yet exist. Add proper finalize handling.
* service: remove some debug printfRyan Lortie2013-01-111-1/+0
|
* keyfile: don't rewrite if there are no changesRyan Lortie2013-01-111-16/+32
|
* writer: avoid spurious rewrites on InitRyan Lortie2013-01-113-1/+27
| | | | | Don't rewrite the gvdb file unless an actual change has been applied to the database (unless creating a non-native database for the first time).
* service: add a keyfile writerRyan Lortie2013-01-114-2/+368
| | | | It is now possible to have keyfile-based dconf databases.
* writer: fix headerRyan Lortie2013-01-111-1/+2
| | | | Fix two mistakes in the dconf-writer.h header.
* service: add a diff() operation on writersRyan Lortie2013-01-112-0/+9
| | | | | | | This diffs the given changeset with the uncommited changes in the writer. The result is effectively the changeset that would have to be applied to the writer to cause it to be equal to the passed-in changeset.
* service: add a "shm" service-db subtypeRyan Lortie2013-01-094-0/+49
| | | | | | | | | Add a shm service-db that does nothing. In effect this provides us with a database maintained in the user runtime dir that never gets synced to any permanent storage. It can be used by putting a line like "service-db:shm/temp" in the dconf profile.
* service: add support for service-dbRyan Lortie2013-01-093-16/+110
| | | | | | Add support for service-db to the service. New types of service-dbs can be implemented via a GIOExtensionPoint.
* service: fix some harmless warningsRyan Lortie2013-01-094-1/+5
|
* service: include list() results in enumerationRyan Lortie2013-01-081-0/+2
| | | | | Add the results of dconf_writer_list() to the output of the enumerate() function on the subtree introspection interface.
* writer: add list class virtual methodRyan Lortie2013-01-082-0/+39
| | | | | This populates a set with the names of databases available for a given writer class.
* service: add new 'string set' utility pseudoclassRyan Lortie2013-01-081-9/+41
| | | | | | Add a thin wrapper around GHashTable for dealing with sets of strings. Port the subtree introspection enumeration code to use it.
* writer: add @type argument to constructorRyan Lortie2013-01-083-4/+8
| | | | | dconf_writer_new() now takes a type so we can create subtypes of DConfWriter.
* writer: move instance and class struct into headerRyan Lortie2013-01-082-48/+67
| | | | | | | ...and add a lot of ->priv. This is not a public API because this header doesn't get installed, but it can now be used by other things in-tree.
* service: try mkdir_with_parents() on failed writesRyan Lortie2013-01-021-0/+16
| | | | | | | If we fail to write the database file, try g_mkdir_with_parents() to create the parent directory and try again. https://bugzilla.gnome.org/show_bug.cgi?id=689136
* service/: don't call g_hash_table_unref on changesetRyan Lortie2013-01-021-1/+1
| | | | | | | | | | | | 4fce559d81bdd3841cfe16fd3a3e6b8e6e9e60f2 changed from using GHashTable to database-mode changesets for caching the state of the database in the service but we missed a case of g_hash_table_unref being called. Fix that now. Problem reported and fix suggested by Philippe Coval. https://bugzilla.gnome.org/show_bug.cgi?id=691013
* writer: Fix typo causing segfaults on service shutdownColin Walters2012-12-171-1/+1
| | | | | | Was seeing crashes in the latest gnome-ostree on login. https://bugzilla.gnome.org/show_bug.cgi?id=690316
* dist the D-Bus interface descriptionRyan Lortie2012-11-191-0/+3
| | | | | | Also make sure the generated files get cleaned. 'make distcheck' fixing.
* Remove calls to g_type_init()Ryan Lortie2012-11-191-2/+0
| | | | Since we now have a hard dependency on the newer GLib anyway.
* service/: always use read() for reading gvdbRyan Lortie2012-11-091-2/+11
| | | | More NFS safety: never mmap() a gvdb on the service side.
* adjust to new gvdb APIsRyan Lortie2012-11-091-1/+1
|
* service: factor out gvdb read/write codeRyan Lortie2012-11-094-141/+204
| | | | | | | | Factor the code for reading and writing DConfChangeset databases to the gvdb file format out from dconf-writer.c. This will allow those functions to be used by other backend implementations that want to store things in gvdb format (like on NFS).
* service: fix some leaks in the writerRyan Lortie2012-11-081-7/+13
| | | | | | | | | | | Also, slightly change the rules about begin/change/commit/end. It used to be theoretically possible to call: begin(), change(), commit(), change(), end(). but that is no longer supported (and it was never used anyway). Now the only valid thing to do after a commit() is end().
* service: use database-mode DConfChangesetRyan Lortie2012-11-081-70/+44
| | | | | | | | | | Port the DConfWriter to use database-mode changesets to represent the contents of the database. This allows us to drop our own copy of the reset algorithm. Also, fix a bug whereby we tried to acquire a list of items from a NULL gvdb table (in the case where the database does not already exist).
* service/Makefile.am: fix code generationRyan Lortie2012-11-081-1/+3
| | | | | This ensures that we don't do the gdbus-codegen twice when running in make -j.
* service: rewriteRyan Lortie2012-10-2316-1119/+969
| | | | | | | | | | | | | | | | Rewrite the dconf-service using gdbus-codegen and generally cleaning things up a lot. The DConfWriter class can now be reasonably subclassed to create more complex types of dconf databases (such as ones that are stored in the local runtime dir and synced up with an NFS home directory). Keep a cache of the keys in the database (instead of re-reading it every time we try to make a change). Drop support for the old D-Bus interface (now that we are two stable releases since it was used). Modify the commandline tool for 'dconf blame' to call the new interface.
* dconf_rebuilder_get_parent: don't leak parent_nameMatthias Clasen2012-10-211-0/+1
| | | | | | Leak introduced in facae6ffcd5b2935f9b708eecb1fd5aa7c8ddf86. Tracked down by Fabien Tassin in https://bugzilla.gnome.org/show_bug.cgi?id=686573
* service: remove ancient migration codeRyan Lortie2012-07-161-35/+2
| | | | | | | | A long time ago before dconf supported profiles, the user database file was called ~/.config/dconf. We've had migration code to rename it to ~/.config/dconf/user for two years now. Drop that code.
* service: stop using gvdb_table_walk()Ryan Lortie2012-07-091-142/+98
| | | | Use the new gvdb_table_get_names() instead.
* clean up C compiler warningsRyan Lortie2012-07-081-1/+1
| | | | | | | Disable C compiler warnings entirely while building Vala code. Fix-up a couple of legitimate issues plus one false-positive (in service.c).
* massive Makefile reorganisationRyan Lortie2012-07-085-10/+12
| | | | | | | | | | 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).
* clean up and factor out the 'shm' codeRyan Lortie2012-07-086-71/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the shm code from the engine and the service and put it in a separate convenience library in shm/. Remove the vestigial shmdir weirdness from the service (since shmdir is now always relative to XDG_RUNTIME_DIR and has been for some time). The purpose of this is so that dconf-engine can be properly unit-tested. dconf-engine now has five points of contact with the world (excluding the users of the engine themselves): - the DCONF_PROFILE environment variable - fopen() of profile files - shm - gvdb - dbus The environment variable is quite easily controlled. fopen() is intercepted in the engine testcase with a interpose of the libc symbol. With this commit now each of dbus, gvdb and shm are implemented in separate utility modules that can be mocked from the testcases.
* add gtester supportRyan Lortie2012-07-061-0/+2
|
* service: introduce a new Changeset-based methodRyan Lortie2012-07-014-2/+94
| | | | Add a "Change" method to the service for writing DConfChangesets.
* common/: create two convenience librariesRyan Lortie2012-07-011-2/+1
| | | | | | | One -fPIC and one without. This is done instead of pulling the various source files from other Makefiles.
* service: Drop a level of variant wrappingRyan Lortie2012-07-012-9/+9
| | | | | | | Internally, the service was passing around GVariant values with an extra layer of variant wrapping (ie: how we received them off the wire). Stop doing that because it's pointless.
* blame mode: record all writes, not just the firstRyan Lortie2012-03-072-10/+13
|
* service: add "blame mode"Ryan Lortie2012-03-074-2/+152
| | | | | | | | If DCONF_BLAME is in the environment or kernel commandline then dconf-service will take steps to gather information about the first request it received (ie: the one that caused it to be activated). This is useful for helping to track down writes that occur at login.
* build: stop non-portable use of 'echo -e'Ryan Lortie2012-02-051-1/+4
| | | | | | Mac OS echo doesn't like '-e' so avoid using it in our Makefile. https://bugzilla.gnome.org/show_bug.cgi?id=667659