diff options
Diffstat (limited to 'src/client/rspamc.c')
-rw-r--r-- | src/client/rspamc.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/client/rspamc.c b/src/client/rspamc.c index ff5f23819..2bd137607 100644 --- a/src/client/rspamc.c +++ b/src/client/rspamc.c @@ -1630,22 +1630,26 @@ rspamc_process_input (struct event_base *ev_base, struct rspamc_command *cmd, if (conn != NULL) { cbdata = g_malloc0 (sizeof (struct rspamc_callback_data)); cbdata->cmd = cmd; - cbdata->filename = g_strdup (name); + + if (name) { + cbdata->filename = g_strdup (name); + } if (cmd->need_input) { rspamd_client_command (conn, cmd->path, attrs, in, rspamc_client_cb, - cbdata, compressed, dictionary, &err); + cbdata, compressed, dictionary, cbdata->filename, &err); } else { rspamd_client_command (conn, - cmd->path, - attrs, - NULL, - rspamc_client_cb, - cbdata, - compressed, - dictionary, - &err); + cmd->path, + attrs, + NULL, + rspamc_client_cb, + cbdata, + compressed, + dictionary, + cbdata->filename, + &err); } } else { |