From 3de590b8b2c3c0eb8a4fbacf877867ce7e6fca10 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 22 Apr 2014 17:32:48 +0100 Subject: Fix output for input-less commands. --- src/client/rspamc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/client') diff --git a/src/client/rspamc.c b/src/client/rspamc.c index ebf0daed7..ee3d30042 100644 --- a/src/client/rspamc.c +++ b/src/client/rspamc.c @@ -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); -- cgit v1.2.3