Mark control commands specially so the client can identify them, based

on a diff from George Nachman a while back.
This commit is contained in:
Nicholas Marriott
2013-06-23 12:41:54 +00:00
parent d6debc21c7
commit 662d471215
2 changed files with 8 additions and 2 deletions

View File

@ -55,6 +55,7 @@ control_callback(struct client *c, int closed, unused void *data)
{
char *line, *cause;
struct cmd_list *cmdlist;
struct cmd *cmd;
if (closed)
c->flags |= CLIENT_EXIT;
@ -78,6 +79,8 @@ control_callback(struct client *c, int closed, unused void *data)
free(cause);
} else {
TAILQ_FOREACH(cmd, &cmdlist->list, qentry)
cmd->flags |= CMD_CONTROL;
cmdq_run(c->cmdq, cmdlist);
cmd_list_free(cmdlist);
}