From 0766120230d85feb1508f8bd4bbb52c95cb71d42 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 22 Aug 2017 12:42:44 +0300 Subject: 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. --- gdbus/client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdbus') 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); -- cgit v1.2.1