aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicm <nicm>2020-05-24 14:45:00 +0000
committernicm <nicm>2020-05-24 14:45:00 +0000
commit14a9fd58d56211f9ee1ee9347d135fc00e03d4bd (patch)
tree33da1858498c730089d59245369026ea05440010
parent18aab909593440bfa4fe003a9f683c0fb2993461 (diff)
downloadrtmux-14a9fd58d56211f9ee1ee9347d135fc00e03d4bd.tar.gz
rtmux-14a9fd58d56211f9ee1ee9347d135fc00e03d4bd.tar.bz2
rtmux-14a9fd58d56211f9ee1ee9347d135fc00e03d4bd.zip
Remove leftover call to control_free_offsets and do not use for
non-control clients.
-rw-r--r--server-client.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/server-client.c b/server-client.c
index a1ed16ab..5c8f4940 100644
--- a/server-client.c
+++ b/server-client.c
@@ -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);