diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-11-21 17:14:55 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-11-21 17:14:55 -0500 |
commit | 0f5d41e3bbc2741c86b4c85f9f52b22cf35aa71b (patch) | |
tree | e23c9636e767fe3169f47808f6e7e8e517e34261 | |
parent | 5006829041b202f73d051be016a41adf3662bfdc (diff) |
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.
-rw-r--r-- | src/wayland-client.c | 2 | ||||
-rw-r--r-- | 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); |