summaryrefslogtreecommitdiffstats
path: root/cmd-server-info.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-09-07 21:01:50 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-09-07 21:01:50 +0000
commit51c95747d878405bcbe2077c5c27c6b1a87c48a8 (patch)
tree478546c5871bbbf64e189e1a89e89d5de3aa042a /cmd-server-info.c
parente323f6620d6d64da7c9337fa2e5f8f9f0deb4394 (diff)
Reference count clients and sessions rather than relying on a saved index for
cmd-choose-*.
Diffstat (limited to 'cmd-server-info.c')
-rw-r--r--cmd-server-info.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/cmd-server-info.c b/cmd-server-info.c
index 14212478..48ea3707 100644
--- a/cmd-server-info.c
+++ b/cmd-server-info.c
@@ -91,9 +91,10 @@ cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx)
continue;
ctx->print(ctx, "%2d: %s (%d, %d): %s [%ux%u %s] "
- "[flags=0x%x/0x%x]", i, c->tty.path, c->ibuf.fd, c->tty.fd,
- c->session->name, c->tty.sx, c->tty.sy, c->tty.termname,
- c->flags, c->tty.flags);
+ "[flags=0x%x/0x%x, references=%u]", i, c->tty.path,
+ c->ibuf.fd, c->tty.fd, c->session->name,
+ c->tty.sx, c->tty.sy, c->tty.termname, c->flags,
+ c->tty.flags, c->references);
}
ctx->print(ctx, "%s", "");
@@ -109,8 +110,9 @@ cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx)
*strchr(tim, '\n') = '\0';
ctx->print(ctx, "%2u: %s: %u windows (created %s) [%ux%u] "
- "[flags=0x%x]", i, s->name, winlink_count(&s->windows),
- tim, s->sx, s->sy, s->flags);
+ "[flags=0x%x, references=%u]", i, s->name,
+ winlink_count(&s->windows), tim, s->sx, s->sy, s->flags,
+ s->references);
RB_FOREACH(wl, winlinks, &s->windows) {
w = wl->window;
ctx->print(ctx, "%4u: %s [%ux%u] [flags=0x%x, "