diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-05-25 10:44:10 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-05-25 10:44:10 +0000 |
commit | 5e605a2eb3d7a6d0127c222357d9f1ed5a4507a4 (patch) | |
tree | 2a080ea688f9d1861f24e0dec09ce17410da8056 | |
parent | da5710c0b985b5e2b72f8cb1916f6ce590b561b9 (diff) |
Use client name when logging command queue.
-rw-r--r-- | usr.bin/tmux/cmd-queue.c | 6 | ||||
-rw-r--r-- | usr.bin/tmux/cmd.c | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/tmux/cmd-queue.c b/usr.bin/tmux/cmd-queue.c index 256829cec62..6fd9f9bacb9 100644 --- a/usr.bin/tmux/cmd-queue.c +++ b/usr.bin/tmux/cmd-queue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-queue.c,v 1.69 2019/05/23 13:08:43 nicm Exp $ */ +/* $OpenBSD: cmd-queue.c,v 1.70 2019/05/25 10:44:09 nicm Exp $ */ /* * Copyright (c) 2013 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -32,11 +32,11 @@ static struct cmdq_list global_queue = TAILQ_HEAD_INITIALIZER(global_queue); static const char * cmdq_name(struct client *c) { - static char s[32]; + static char s[256]; if (c == NULL) return ("<global>"); - xsnprintf(s, sizeof s, "<%p>", c); + xsnprintf(s, sizeof s, "<%s>", c->name); return (s); } diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c index 1245a1be1fe..821964e56d9 100644 --- a/usr.bin/tmux/cmd.c +++ b/usr.bin/tmux/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.151 2019/05/25 07:29:04 nicm Exp $ */ +/* $OpenBSD: cmd.c,v 1.152 2019/05/25 10:44:09 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -383,9 +383,9 @@ cmd_get_alias(const char *name) static const struct cmd_entry * cmd_find(const char *name, char **cause) { - const struct cmd_entry **loop, *entry, *found = NULL; - int ambiguous; - char s[BUFSIZ]; + const struct cmd_entry **loop, *entry, *found = NULL; + int ambiguous; + char s[BUFSIZ]; ambiguous = 0; for (loop = cmd_table; *loop != NULL; loop++) { |