diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2013-06-23 12:41:54 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2013-06-28 20:55:16 +0100 |
commit | a0172a6ae561fd6764fcfcdd975fc7a07f43dc79 (patch) | |
tree | a257dfb892dc7da31c5dc4dc9fa59262282bd643 /cmd-queue.c | |
parent | 1099442c0a9751a00524895c42ba1508eced0b25 (diff) | |
download | rtmux-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 'cmd-queue.c')
-rw-r--r-- | cmd-queue.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd-queue.c b/cmd-queue.c index 671f1e95..243f73dd 100644 --- a/cmd-queue.c +++ b/cmd-queue.c @@ -157,14 +157,17 @@ int cmdq_guard(struct cmd_q *cmdq, const char *guard) { struct client *c = cmdq->client; + int flags; if (c == NULL) return 0; if (!(c->flags & CLIENT_CONTROL)) return 0; - evbuffer_add_printf(c->stdout_data, "%%%s %ld %u\n", guard, - (long) cmdq->time, cmdq->number); + flags = !!(cmdq->cmd->flags & CMD_CONTROL); + + evbuffer_add_printf(c->stdout_data, "%%%s %ld %u %d\n", guard, + (long) cmdq->time, cmdq->number, flags); server_push_stdout(c); return 1; } |