diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-05-24 14:45:01 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-05-24 14:45:01 +0000 |
commit | 31ab894953c8977edf956822cc30cca44b772f69 (patch) | |
tree | a22f5eb69f004fb271a0921f91b842bd36e68ab6 | |
parent | 889fb849134eea60925d1b5d06dcc57c1edaafef (diff) |
Remove leftover call to control_free_offsets and do not use for
non-control clients.
-rw-r--r-- | usr.bin/tmux/server-client.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c index 9fdad1ac1b1..8698954cdac 100644 --- a/usr.bin/tmux/server-client.c +++ b/usr.bin/tmux/server-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-client.c,v 1.349 2020/05/24 09:40:17 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.350 2020/05/24 14:45:00 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -301,7 +301,6 @@ server_client_lost(struct client *c) RB_REMOVE(client_windows, &c->windows, cw); free(cw); } - control_free_offsets(c); TAILQ_REMOVE(&clients, c, entry); log_debug("lost client %p", c); @@ -2344,15 +2343,18 @@ server_client_set_flags(struct client *c, const char *flags) if (not) next++; - if (strcmp(next, "no-output") == 0) - flag = CLIENT_CONTROL_NOOUTPUT; - else if (strcmp(next, "read-only") == 0) + flag = 0; + if (c->flags & CLIENT_CONTROL) { + if (strcmp(next, "no-output") == 0) + flag = CLIENT_CONTROL_NOOUTPUT; + } + if (strcmp(next, "read-only") == 0) flag = CLIENT_READONLY; else if (strcmp(next, "ignore-size") == 0) flag = CLIENT_IGNORESIZE; else if (strcmp(next, "active-pane") == 0) flag = CLIENT_ACTIVEPANE; - else + if (flag == 0) continue; log_debug("client %s set flag %s", c->name, next); |