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).
This commit is contained in:
nicm
2020-04-13 10:59:58 +00:00
parent c20eb0c0ae
commit 04cdd03525
62 changed files with 470 additions and 336 deletions

View File

@ -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) {