summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-lock-server.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/cmd-lock-server.c')
-rw-r--r--usr.bin/tmux/cmd-lock-server.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/tmux/cmd-lock-server.c b/usr.bin/tmux/cmd-lock-server.c
index 3ddbfd5956d..3e1075722e0 100644
--- a/usr.bin/tmux/cmd-lock-server.c
+++ b/usr.bin/tmux/cmd-lock-server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-lock-server.c,v 1.13 2013/03/24 09:27:19 nicm Exp $ */
+/* $OpenBSD: cmd-lock-server.c,v 1.14 2013/03/24 09:54:10 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -28,7 +28,7 @@
* Lock commands.
*/
-enum cmd_retval cmd_lock_server_exec(struct cmd *, struct cmd_ctx *);
+enum cmd_retval cmd_lock_server_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_lock_server_entry = {
"lock-server", "lock",
@@ -61,7 +61,7 @@ const struct cmd_entry cmd_lock_client_entry = {
};
enum cmd_retval
-cmd_lock_server_exec(struct cmd *self, unused struct cmd_ctx *ctx)
+cmd_lock_server_exec(struct cmd *self, unused struct cmd_q *cmdq)
{
struct args *args = self->args;
struct client *c;
@@ -70,11 +70,13 @@ cmd_lock_server_exec(struct cmd *self, unused struct cmd_ctx *ctx)
if (self->entry == &cmd_lock_server_entry)
server_lock();
else if (self->entry == &cmd_lock_session_entry) {
- if ((s = cmd_find_session(ctx, args_get(args, 't'), 0)) == NULL)
+ s = cmd_find_session(cmdq, args_get(args, 't'), 0);
+ if (s == NULL)
return (CMD_RETURN_ERROR);
server_lock_session(s);
} else {
- if ((c = cmd_find_client(ctx, args_get(args, 't'), 0)) == NULL)
+ c = cmd_find_client(cmdq, args_get(args, 't'), 0);
+ if (c == NULL)
return (CMD_RETURN_ERROR);
server_lock_client(c);
}