aboutsummaryrefslogtreecommitdiff
path: root/control.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2013-06-23 12:41:54 +0000
committerThomas Adam <thomas@xteddy.org>2013-06-28 20:55:16 +0100
commita0172a6ae561fd6764fcfcdd975fc7a07f43dc79 (patch)
treea257dfb892dc7da31c5dc4dc9fa59262282bd643 /control.c
parent1099442c0a9751a00524895c42ba1508eced0b25 (diff)
downloadrtmux-a0172a6ae561fd6764fcfcdd975fc7a07f43dc79.tar.gz
rtmux-a0172a6ae561fd6764fcfcdd975fc7a07f43dc79.tar.bz2
rtmux-a0172a6ae561fd6764fcfcdd975fc7a07f43dc79.zip
Mark control commands specially so the client can identify them, based
on a diff from George Nachman a while back.
Diffstat (limited to 'control.c')
-rw-r--r--control.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/control.c b/control.c
index ba243fd3..aa79085a 100644
--- a/control.c
+++ b/control.c
@@ -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);
}