[PATCH wayland v3 02/10] server: Log closure before sending it

Derek Foreman derekf at osg.samsung.com
Wed Dec 6 17:22:17 UTC 2017

This seems foolishly cosmetic on the surface - and will reorder log
messages in certain failure cases.  "request could not be marshalled"
will now appear after logging the request that failed to marshal
instead of before.

The real point of this is that a follow up patch will make
wl_closure_send() set fds to -1 as it buffers them for send, so
they can be more easily cleaned up.

Doing that while leaving this order unchanged would result in
printing -1 for fds instead of their value.

Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
 src/wayland-server.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/wayland-server.c b/src/wayland-server.c
index 82a3b01..61e0315 100644
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
@@ -220,11 +220,11 @@ handle_array(struct wl_resource *resource, uint32_t opcode,
+	log_closure(resource, closure, true);
 	if (send_func(closure, resource->client->connection))
 		resource->client->error = 1;
-	log_closure(resource, closure, true);

More information about the wayland-devel mailing list