aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2015-03-24 13:56:26 +0200
committerMarcel Holtmann <marcel@holtmann.org>2015-03-26 10:03:21 +0100
commit2a60afc7f86440858c3290781da601fd7a89af3f (patch)
tree0b8b0b07ad5fc2e4b9d4504c37aa2564a7df1c9a
parentec2b1b842bb2fb258f6777f89d83c0161d1a6283 (diff)
downloadpacrunner-2a60afc7f86440858c3290781da601fd7a89af3f.tar.gz
gdbus: Make GDBusClient work without ObjectManager
This makes GDBusClient work normally without ObjectManager.
-rw-r--r--gdbus/client.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gdbus/client.c b/gdbus/client.c
index fe0c0db..48711ae 100644
--- a/gdbus/client.c
+++ b/gdbus/client.c
@@ -1111,7 +1111,8 @@ static void get_managed_objects(GDBusClient *client)
if (!client->connected)
return;
- if (!client->proxy_added && !client->proxy_removed) {
+ if ((!client->proxy_added && !client->proxy_removed) ||
+ !client->root_path) {
refresh_properties(client);
return;
}
@@ -1212,7 +1213,7 @@ GDBusClient *g_dbus_client_new_full(DBusConnection *connection,
GDBusClient *client;
unsigned int i;
- if (!connection || !service || !root_path)
+ if (!connection || !service)
return NULL;
client = g_try_new0(GDBusClient, 1);
@@ -1238,6 +1239,10 @@ GDBusClient *g_dbus_client_new_full(DBusConnection *connection,
service_connect,
service_disconnect,
client, NULL);
+
+ if (!root_path)
+ return g_dbus_client_ref(client);
+
client->added_watch = g_dbus_add_signal_watch(connection, service,
client->root_path,
DBUS_INTERFACE_OBJECT_MANAGER,