commit 7860c27: [Minor] Do not output crap in json mode
Vsevolod Stakhov
vsevolod at highsecure.ru
Fri Apr 16 15:56:04 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-04-16 16:52:07 +0100
URL: https://github.com/rspamd/rspamd/commit/7860c27eeb4e01250bda16c07236acbbd349bcb9 (HEAD -> master)
[Minor] Do not output crap in json mode
---
src/client/rspamc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/client/rspamc.c b/src/client/rspamc.c
index c2dd3a5d2..f5b1bae61 100644
--- a/src/client/rspamc.c
+++ b/src/client/rspamc.c
@@ -1554,14 +1554,14 @@ rspamc_client_cb (struct rspamd_client_connection *conn,
}
}
else {
- if (cmd->need_input) {
+ if (cmd->need_input && !json) {
if (!compact) {
rspamd_fprintf (out, "Results for file: %s (%.3f seconds)\n",
cbdata->filename, diff);
}
}
else {
- if (!compact) {
+ if (!compact && !json) {
rspamd_fprintf (out, "Results for command: %s (%.3f seconds)\n",
cmd->name, diff);
}
More information about the Commits
mailing list