summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2014-02-11 17:27:47 -0500
committerRyan Lortie <desrt@desrt.ca>2014-02-11 17:39:55 -0500
commit431d1126e752f03f8be91fc8ae213964284189c2 (patch)
tree34969225a9428869965191ecf6aa4e1a6d0b338a /engine
parentb8857f719f6385db67882eec372a16e2ed3e1752 (diff)
downloaddconf-431d1126e752f03f8be91fc8ae213964284189c2.tar.gz
file-db: don't install match rules on no bus
file-db databases don't have an associated D-Bus bus type, so don't try to install match rules for them. https://bugzilla.gnome.org/show_bug.cgi?id=723553
Diffstat (limited to 'engine')
-rw-r--r--engine/dconf-engine.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/engine/dconf-engine.c b/engine/dconf-engine.c
index fc5fb8b..864e8e2 100644
--- a/engine/dconf-engine.c
+++ b/engine/dconf-engine.c
@@ -813,13 +813,16 @@ dconf_engine_watch_fast (DConfEngine *engine,
ow = dconf_engine_call_handle_new (engine, dconf_engine_watch_established,
G_VARIANT_TYPE_UNIT, sizeof (OutstandingWatch));
ow->state = dconf_engine_get_state (engine);
- ow->pending = engine->n_sources;
for (i = 0; i < engine->n_sources; i++)
- dconf_engine_dbus_call_async_func (engine->sources[i]->bus_type, "org.freedesktop.DBus",
- "/org/freedesktop/DBus", "org.freedesktop.DBus", "AddMatch",
- dconf_engine_make_match_rule (engine->sources[i], path),
- &ow->handle, NULL);
+ if (engine->sources[i]->bus_type)
+ {
+ dconf_engine_dbus_call_async_func (engine->sources[i]->bus_type, "org.freedesktop.DBus",
+ "/org/freedesktop/DBus", "org.freedesktop.DBus", "AddMatch",
+ dconf_engine_make_match_rule (engine->sources[i], path),
+ &ow->handle, NULL);
+ ow->pending++;
+ }
}
void
@@ -829,9 +832,10 @@ dconf_engine_unwatch_fast (DConfEngine *engine,
gint i;
for (i = 0; i < engine->n_sources; i++)
- dconf_engine_dbus_call_async_func (engine->sources[i]->bus_type, "org.freedesktop.DBus",
- "/org/freedesktop/DBus", "org.freedesktop.DBus", "RemoveMatch",
- dconf_engine_make_match_rule (engine->sources[i], path), NULL, NULL);
+ if (engine->sources[i]->bus_type)
+ dconf_engine_dbus_call_async_func (engine->sources[i]->bus_type, "org.freedesktop.DBus",
+ "/org/freedesktop/DBus", "org.freedesktop.DBus", "RemoveMatch",
+ dconf_engine_make_match_rule (engine->sources[i], path), NULL, NULL);
}
static void
@@ -852,6 +856,9 @@ dconf_engine_handle_match_rule_sync (DConfEngine *engine,
{
GVariant *result;
+ if (!engine->sources[i]->bus_type)
+ continue;
+
result = dconf_engine_dbus_call_sync_func (engine->sources[i]->bus_type, "org.freedesktop.DBus",
"/org/freedesktop/DBus", "org.freedesktop.DBus", method_name,
dconf_engine_make_match_rule (engine->sources[i], path),