engine: issue warnings once per source
commit048e2e5e9c89eb08ef954194f2a5505e3d4ace3a
authorRyan Lortie <desrt@desrt.ca>
Mon, 25 Nov 2013 16:37:24 +0000 (25 11:37 -0500)
committerRyan Lortie <desrt@desrt.ca>
Mon, 25 Nov 2013 17:23:16 +0000 (25 12:23 -0500)
tree4421b539bdefc57910fd54cca4d49dde1ab21063
parentb7978d79b21340bb80725c6deb7e2aafba436175
engine: issue warnings once per source

On failure to open a gvdb file in /etc/dconf/db we would issue a warning
once per process -- even if multiple files were missing.

This was enforced using a static variable.

An unfortunate side effect of this global state is that the testcases
couldn't reliably know if to expect the error or not.  This issue was
side-stepped by running any cases that may emit the warning under a
fork, but that made it difficult to debug some of the cases.

Rework the backends not to use global state for the flag and instead
store it per-source.

Remove a use of g_test_trap_fork().
engine/dconf-engine-source-service.c
engine/dconf-engine-source-system.c
engine/dconf-engine-source.h
tests/engine.c