From 0f5d41e3bbc2741c86b4c85f9f52b22cf35aa71b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 21 Nov 2012 17:14:55 -0500 Subject: [PATCH] debug: Allow WAYLAND_DEBUG=server/client for server/client side only debug By default the server will dump protocol for both the server and its clients when run with WAYLAND_DEBUG=1. That's still the case, but it now also understands WAYLAND_DEBUG=client or WAYLAND_DEBUG=server, which will only enable debug dumping on either client or server side. --- src/wayland-client.c | 2 +- src/wayland-server.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wayland-client.c b/src/wayland-client.c index 5ab000c..4d0637b 100644 --- a/src/wayland-client.c +++ b/src/wayland-client.c @@ -502,7 +502,7 @@ wl_display_connect_to_fd(int fd) const char *debug; debug = getenv("WAYLAND_DEBUG"); - if (debug) + if (debug && (strstr(debug, "client") || strstr(debug, "1"))) wl_debug = 1; display = malloc(sizeof *display); diff --git a/src/wayland-server.c b/src/wayland-server.c index acbab9a..f7f4c14 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.c @@ -1078,7 +1078,7 @@ wl_display_create(void) const char *debug; debug = getenv("WAYLAND_DEBUG"); - if (debug) + if (debug && (strstr(debug, "server") || strstr(debug, "1"))) wl_debug = 1; display = malloc(sizeof *display); -- 2.7.4