diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2013-06-23 12:41:54 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2013-06-23 12:41:54 +0000 |
commit | 662d471215d66d3c44a9251cef7d00b25587851d (patch) | |
tree | b740b3c24d890d72c68212bc8d1c570a89ea7ce9 /cmd-queue.c | |
parent | d6debc21c777dc0e993fd7928bbba51075685491 (diff) |
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 a64d332c..904b092c 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; } |