From a0172a6ae561fd6764fcfcdd975fc7a07f43dc79 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 23 Jun 2013 12:41:54 +0000 Subject: Mark control commands specially so the client can identify them, based on a diff from George Nachman a while back. --- cmd-queue.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cmd-queue.c') 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; } -- cgit