summaryrefslogtreecommitdiff
path: root/gdbus/client.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2016-01-05 14:44:23 -0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2016-01-07 14:56:26 -0300
commit4b92749473f74dba456df78a8734cf8bf8213860 (patch)
tree9855339f4e724c357e2ea8717608720662293f7a /gdbus/client.c
parent9b2250901e2aab9b09bcdd3ded813f8cf1a55db0 (diff)
downloadbluez-4b92749473f74dba456df78a8734cf8bf8213860.tar.gz
gdbus/client: Always call ready callback
Call ready callback regardless of the reply to GetManagedObjects since otherwise the user code will be left waiting forever when in fact no proxy will be created.
Diffstat (limited to 'gdbus/client.c')
-rw-r--r--gdbus/client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdbus/client.c b/gdbus/client.c
index 48711ae81..068e778ce 100644
--- a/gdbus/client.c
+++ b/gdbus/client.c
@@ -1073,9 +1073,6 @@ static void parse_managed_objects(GDBusClient *client, DBusMessage *msg)
dbus_message_iter_next(&dict);
}
-
- if (client->ready)
- client->ready(client, client->ready_data);
}
static void get_managed_objects_reply(DBusPendingCall *call, void *user_data)
@@ -1096,6 +1093,9 @@ static void get_managed_objects_reply(DBusPendingCall *call, void *user_data)
parse_managed_objects(client, reply);
done:
+ if (client->ready)
+ client->ready(client, client->ready_data);
+
dbus_message_unref(reply);
dbus_pending_call_unref(client->get_objects_call);