diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2017-08-22 12:42:44 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2017-08-22 12:42:44 +0300 |
commit | 0766120230d85feb1508f8bd4bbb52c95cb71d42 (patch) | |
tree | ebc7164c911429269aca55b7251824fcaf161038 /gdbus | |
parent | de6c9e2cf05d7ecc4f11f33c5a2b5a9da33edf5a (diff) | |
download | bluez-0766120230d85feb1508f8bd4bbb52c95cb71d42.tar.gz |
gdbus: Fix not always appending proxy to the list
Changes introduced by ef024c2c44b4f0dab3c054d062a911cacef1fdc9 have a
regression were a proxy may not be appended to the proxy_list causing
tests to fail as the proxies maybe be added multiple time since
proxy_look would not be able to find existing instances.
Diffstat (limited to 'gdbus')
-rw-r--r-- | gdbus/client.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdbus/client.c b/gdbus/client.c index 309e1959e..9b0f7f7a9 100644 --- a/gdbus/client.c +++ b/gdbus/client.c @@ -288,7 +288,7 @@ static void proxy_added(GDBusClient *client, GDBusProxy *proxy) if (client->proxy_added) client->proxy_added(proxy, client->user_data); -; proxy->pending = FALSE; + proxy->pending = FALSE; } static void get_all_properties_reply(DBusPendingCall *call, void *user_data) @@ -437,6 +437,8 @@ static GDBusProxy *proxy_new(GDBusClient *client, const char *path, proxy, NULL); proxy->pending = TRUE; + client->proxy_list = g_list_append(client->proxy_list, proxy); + return g_dbus_proxy_ref(proxy); } @@ -498,8 +500,6 @@ GDBusProxy *g_dbus_proxy_new(GDBusClient *client, const char *path, if (proxy == NULL) return NULL; - client->proxy_list = g_list_append(client->proxy_list, proxy); - if (client->connected && !client->get_objects_call) get_all_properties(proxy); |