From 04cdd035250b93b728678d515b69690653dced4e Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 13 Apr 2020 10:59:58 +0000 Subject: Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make its use more clearly defined and preparation for some future work). --- cmd-detach-client.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'cmd-detach-client.c') diff --git a/cmd-detach-client.c b/cmd-detach-client.c index 34682459..f4e350a8 100644 --- a/cmd-detach-client.c +++ b/cmd-detach-client.c @@ -57,11 +57,12 @@ const struct cmd_entry cmd_suspend_client_entry = { static enum cmd_retval cmd_detach_client_exec(struct cmd *self, struct cmdq_item *item) { - struct args *args = cmd_get_args(self); - struct client *c, *cloop; - struct session *s; - enum msgtype msgtype; - const char *cmd = args_get(args, 'E'); + struct args *args = cmd_get_args(self); + struct cmd_find_state *source = cmdq_get_source(item); + struct client *c, *cloop; + struct session *s; + enum msgtype msgtype; + const char *cmd = args_get(args, 'E'); if ((c = cmd_find_client(item, args_get(args, 't'), 0)) == NULL) return (CMD_RETURN_ERROR); @@ -77,7 +78,7 @@ cmd_detach_client_exec(struct cmd *self, struct cmdq_item *item) msgtype = MSG_DETACH; if (args_has(args, 's')) { - s = item->source.s; + s = source->s; if (s == NULL) return (CMD_RETURN_NORMAL); TAILQ_FOREACH(cloop, &clients, entry) { -- cgit