Thread (4 messages) read the whole thread 4 messages, 3 authors, 2017-08-15

Re: [PATCH v2] gdbus: Fix calling GetAll while GetManagedObject is pending

From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Date: 2017-08-14 17:16:53

Hi Luiz,

Luiz Augusto von Dentz [off-list ref] writes:
From: Luiz Augusto von Dentz <redacted>

If proxies are created while the client is not ready put them into a
pending list so only if they are not found in GetManagedObject reply
call GetAll.
---
 gdbus/client.c | 96 ++++++++++++++++++++++++++++++++++++----------------------
 1 file changed, 59 insertions(+), 37 deletions(-)
[...]
quoted hunk ↗ jump to hunk
@@ -424,6 +435,7 @@ static GDBusProxy *proxy_new(GDBusClient *client, const char *path,
 							proxy->interface,
 							properties_changed,
 							proxy, NULL);
+	proxy->pending = TRUE;

 	return g_dbus_proxy_ref(proxy);
 }
@@ -478,15 +490,19 @@ GDBusProxy *g_dbus_proxy_new(GDBusClient *client, const char *path,
 	if (client == NULL)
 		return NULL;

-	proxy = proxy_lookup(client, path, interface);
+	proxy = proxy_lookup(client->proxy_list, path, interface);
 	if (proxy)
 		return g_dbus_proxy_ref(proxy);

+
Extra empty line here.
 	proxy = proxy_new(client, path, interface);
 	if (proxy == NULL)
 		return NULL;
Just that nitpick, looking good.


Cheers,
--
Vinicius
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help