]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Fix output for input-less commands.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 22 Apr 2014 16:32:48 +0000 (17:32 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 22 Apr 2014 16:32:48 +0000 (17:32 +0100)
src/client/rspamc.c

index ebf0daed7f936b23ddc504702b5ca1326743ed66..ee3d30042b9ad3ed4b119f5a68590c94018e88fa 100644 (file)
@@ -509,7 +509,12 @@ rspamc_client_cb (struct rspamd_client_connection *conn,
        struct rspamc_command *cmd;
 
        cmd = cbdata->cmd;
-       rspamd_fprintf (stdout, "Results for file: %s\n", cbdata->filename);
+       if (cmd->need_input) {
+               rspamd_fprintf (stdout, "Results for file: %s\n", cbdata->filename);
+       }
+       else {
+               rspamd_fprintf (stdout, "Results for command: %s\n", cmd->name);
+       }
        if (result != NULL) {
                if (headers && msg != NULL) {
                        rspamc_output_headers (msg);