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.
This commit is contained in:
Kristian Høgsberg 2012-11-21 17:14:55 -05:00
parent 5006829041
commit 0f5d41e3bb
2 changed files with 2 additions and 2 deletions

View file

@ -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);