]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Do not output crap in json mode
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 16 Apr 2021 15:52:07 +0000 (16:52 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 16 Apr 2021 15:52:07 +0000 (16:52 +0100)
src/client/rspamc.c

index c2dd3a5d274a1f7f0363dacfdedcaf54bde33035..f5b1bae61f2d74896487a5f08ce41a7acbf1ac12 100644 (file)
@@ -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);
                                }