diff options
author | 2009-10-04 10:55:30 +0000 | |
---|---|---|
committer | 2009-10-04 10:55:30 +0000 | |
commit | 5d8d7431a3e1236ca18e120eda674bcdec3ed03f (patch) | |
tree | 55177fc1d5b3fa9be14bdd07f7a3b21ac3a72e56 | |
parent | Add a key string for space ("Space") and document the names, suggested by (diff) | |
download | wireguard-openbsd-5d8d7431a3e1236ca18e120eda674bcdec3ed03f.tar.xz wireguard-openbsd-5d8d7431a3e1236ca18e120eda674bcdec3ed03f.zip |
Check for already locked/suspended clients in server_lock_client rather than
its callers.
-rw-r--r-- | usr.bin/tmux/server-fn.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/tmux/server-fn.c b/usr.bin/tmux/server-fn.c index 1a0f0a6aa3d..dadc2b6c003 100644 --- a/usr.bin/tmux/server-fn.c +++ b/usr.bin/tmux/server-fn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-fn.c,v 1.23 2009/09/24 14:17:09 nicm Exp $ */ +/* $OpenBSD: server-fn.c,v 1.24 2009/10/04 10:55:30 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -164,8 +164,6 @@ server_lock(void) c = ARRAY_ITEM(&clients, i); if (c == NULL || c->session == NULL) continue; - if (c->flags & CLIENT_SUSPENDED) - continue; server_lock_client(c); } } @@ -180,8 +178,6 @@ server_lock_session(struct session *s) c = ARRAY_ITEM(&clients, i); if (c == NULL || c->session == NULL || c->session != s) continue; - if (c->flags & CLIENT_SUSPENDED) - continue; server_lock_client(c); } } @@ -193,6 +189,9 @@ server_lock_client(struct client *c) size_t cmdlen; struct msg_lock_data lockdata; + if (c->flags & CLIENT_SUSPENDED) + return; + cmd = options_get_string(&c->session->options, "lock-command"); cmdlen = strlcpy(lockdata.cmd, cmd, sizeof lockdata.cmd); if (cmdlen >= sizeof lockdata.cmd) |