summaryrefslogtreecommitdiffstats
path: root/cmd-queue.c
diff options
context:
space:
mode:
authornicm <nicm>2020-01-05 12:51:43 +0000
committernicm <nicm>2020-01-05 12:51:43 +0000
commit7c6c66cc3cc40b663fc2ba8573f26a6aa4cb291e (patch)
tree8b2b3983d7ddfd90c88969d7c5f57b8f0f6850b9 /cmd-queue.c
parent1870cc70ef6eded1ac3a809124ec21de1b98dbd9 (diff)
Send errors to stdout in control mode so they don't get reordered with
other output, reported by George Nachman in GitHub issue 2048.
Diffstat (limited to 'cmd-queue.c')
-rw-r--r--cmd-queue.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd-queue.c b/cmd-queue.c
index 75b5d8f9..59c7a35c 100644
--- a/cmd-queue.c
+++ b/cmd-queue.c
@@ -551,7 +551,10 @@ cmdq_error(struct cmdq_item *item, const char *fmt, ...)
msg = utf8_sanitize(tmp);
free(tmp);
}
- file_error(c, "%s\n", msg);
+ if (c->flags & CLIENT_CONTROL)
+ file_print(c, "%s\n", msg);
+ else
+ file_error(c, "%s\n", msg);
c->retval = 1;
} else {
*msg = toupper((u_char) *msg);