aboutsummaryrefslogtreecommitdiff
path: root/cmd-queue.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-05-25 18:41:51 +0100
committerThomas Adam <thomas@xteddy.org>2019-05-25 18:41:51 +0100
commit463bd8abb9248c31214c951221c3cf96dbffb56e (patch)
treeea7bd85988b7dedd4bb24c72743e3b473f3c8fa7 /cmd-queue.c
parenta69211aff5968f2bf71f0471cc67124dbd4597dd (diff)
parenta65a6d62d19136e20ce6e6ec72d676a334dcc914 (diff)
downloadrtmux-463bd8abb9248c31214c951221c3cf96dbffb56e.tar.gz
rtmux-463bd8abb9248c31214c951221c3cf96dbffb56e.tar.bz2
rtmux-463bd8abb9248c31214c951221c3cf96dbffb56e.zip
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-queue.c')
-rw-r--r--cmd-queue.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd-queue.c b/cmd-queue.c
index 0cfa57fe..f08d7c02 100644
--- a/cmd-queue.c
+++ b/cmd-queue.c
@@ -32,11 +32,14 @@ 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);
+ if (c->name != NULL)
+ xsnprintf(s, sizeof s, "<%s>", c->name);
+ else
+ xsnprintf(s, sizeof s, "<%p>", c);
return (s);
}